Add admin portal
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import { revokeAllUserSessions } from '@/modules/admin/services/admin-users.service';
|
||||
import type { AppContext } from '@/types/hono';
|
||||
|
||||
type RevokeSessionsParams = { id: string };
|
||||
|
||||
export async function revokeAllSessionsHandler(c: AppContext) {
|
||||
const { id } = c.req.valid('param' as never) as RevokeSessionsParams;
|
||||
|
||||
const count = await revokeAllUserSessions(id);
|
||||
|
||||
return c.json({ message: `${count} sesiones cerradas correctamente.` });
|
||||
}
|
||||
Reference in New Issue
Block a user