mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 17:03:49 +01:00
fix: QueryFailedError when logging user's IPs (#8973)
* fix QueryFailedError when logging user's IPs * use `orIgnore` to fix
This commit is contained in:
parent
997983dd7b
commit
8b106bf548
@ -68,11 +68,11 @@ export default (endpoint: IEndpoint, ctx: Koa.Context) => new Promise<void>((res
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
UserIps.insert({
|
UserIps.createQueryBuilder().insert().values({
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
ip: ip,
|
ip: ip,
|
||||||
});
|
}).orIgnore(true).execute();
|
||||||
} catch {
|
} catch {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user