ref: use username for search
This commit is contained in:
parent
9e73fea852
commit
0d46e6fee3
@ -93,17 +93,10 @@ export async function userRoutes(app: Fastify) {
|
||||
// Search for user by username or GitHub login
|
||||
const user = await db.account.findFirst({
|
||||
where: {
|
||||
OR: [
|
||||
{ username: query },
|
||||
{
|
||||
githubUser: {
|
||||
profile: {
|
||||
path: ['login'],
|
||||
equals: query
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
username: {
|
||||
startsWith: query,
|
||||
mode: 'insensitive'
|
||||
}
|
||||
},
|
||||
include: {
|
||||
githubUser: true
|
||||
|
Loading…
Reference in New Issue
Block a user