11
apps/web/src/app/api/actions/recent/route.ts
Executable file
11
apps/web/src/app/api/actions/recent/route.ts
Executable file
@@ -0,0 +1,11 @@
|
||||
import { handleApi } from "@/lib/api";
|
||||
import { requireUser } from "@/lib/services/user";
|
||||
import { getRecentActions } from "@/lib/services/action-events";
|
||||
|
||||
export async function GET() {
|
||||
return handleApi(async () => {
|
||||
const { user } = await requireUser();
|
||||
const actions = await getRecentActions(user.id, 30);
|
||||
return { actions };
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user