import { unblockUser } from '@/modules/admin/services/admin-users.service';
import type { AppContext } from '@/types/hono';

type UnblockUserParams = { id: string };

export async function unblockUserHandler(c: AppContext) {
  const { id } = c.req.valid('param' as never) as UnblockUserParams;

  await unblockUser(id);

  return c.json({ message: 'Usuario desbloqueado correctamente.' });
}
