override verified status
All checks were successful
backend-action / build-image (push) Successful in 25s
All checks were successful
backend-action / build-image (push) Successful in 25s
This commit is contained in:
@@ -27,6 +27,7 @@ const userUpdateSchema = userInsertSchema
|
|||||||
const opinionInsertSchema = createInsertSchema(userOpinion)
|
const opinionInsertSchema = createInsertSchema(userOpinion)
|
||||||
.omit({
|
.omit({
|
||||||
userId: true,
|
userId: true,
|
||||||
|
verified: true,
|
||||||
})
|
})
|
||||||
.array()
|
.array()
|
||||||
.default([]);
|
.default([]);
|
||||||
@@ -34,6 +35,7 @@ const opinionInsertSchema = createInsertSchema(userOpinion)
|
|||||||
const opinionUpdateSchema = createInsertSchema(userOpinion)
|
const opinionUpdateSchema = createInsertSchema(userOpinion)
|
||||||
.omit({
|
.omit({
|
||||||
userId: true,
|
userId: true,
|
||||||
|
verified: true,
|
||||||
})
|
})
|
||||||
.required({ opinionId: true });
|
.required({ opinionId: true });
|
||||||
type OpinionInsertSchema = z.infer<typeof opinionInsertSchema>;
|
type OpinionInsertSchema = z.infer<typeof opinionInsertSchema>;
|
||||||
@@ -186,6 +188,7 @@ async function getAllUser(
|
|||||||
return users.map((u) => ({
|
return users.map((u) => ({
|
||||||
...u,
|
...u,
|
||||||
phone: hidePhone(u.phone),
|
phone: hidePhone(u.phone),
|
||||||
|
verified: true,
|
||||||
image: u.image ? `${Config.minioPublicBucketEndpoint}${u.image}` : null,
|
image: u.image ? `${Config.minioPublicBucketEndpoint}${u.image}` : null,
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
@@ -211,6 +214,7 @@ async function getUser(userId: number, showPhone: boolean) {
|
|||||||
image: user.image
|
image: user.image
|
||||||
? `${Config.minioPublicBucketEndpoint}${user.image}`
|
? `${Config.minioPublicBucketEndpoint}${user.image}`
|
||||||
: null,
|
: null,
|
||||||
|
verified: true,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user