refactor: replace all explicit any types with proper TypeScript types
Backend resolvers: typed enrichArticle/enrichVideo/enrichModel with DB and $inferSelect types, SQL<unknown>[] for conditions arrays, proper enum casts for status/role fields, $inferInsert for .set() updates, typed raw SQL result rows in gamification, ReplyLike interface for ctx.reply in auth. Frontend: typed catch blocks with Error/interface casts, isActiveLink param, adminGetUser response, tags filter callback. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1245,7 +1245,9 @@ export async function adminGetUser(userId: string, token?: string) {
|
||||
"adminGetUser",
|
||||
async () => {
|
||||
const client = token ? getAuthClient(token) : getGraphQLClient();
|
||||
const data = await client.request<{ adminGetUser: any }>(ADMIN_GET_USER_QUERY, { userId });
|
||||
const data = await client.request<{
|
||||
adminGetUser: User & { photos: Array<{ id: string; filename: string }> };
|
||||
}>(ADMIN_GET_USER_QUERY, { userId });
|
||||
return data.adminGetUser;
|
||||
},
|
||||
{ userId },
|
||||
|
||||
Reference in New Issue
Block a user