chat wip
This commit is contained in:
@@ -2,6 +2,7 @@ import { Type } from 'typebox'
|
||||
|
||||
export const GetUserQuerySchema = Type.Partial(Type.Object({
|
||||
username: Type.String(),
|
||||
id: Type.String(),
|
||||
}), { $id: 'GetUserQuery' })
|
||||
|
||||
export const UserPreferencesSchema = Type.Object({
|
||||
|
||||
@@ -19,7 +19,7 @@ const plugin: FastifyPluginAsyncTypebox = async (fastify) => {
|
||||
},
|
||||
async (req, reply) => {
|
||||
const user = await fastify.prisma.user.findFirst({
|
||||
where: { username: req.query.username },
|
||||
where: { username: req.query.username, id: req.query.id },
|
||||
select: {
|
||||
id: true,
|
||||
username: true,
|
||||
|
||||
Reference in New Issue
Block a user