diff --git a/packages/backend/src/server/api/api-handler.ts b/packages/backend/src/server/api/api-handler.ts index 34ff970b4..ec71ddd2c 100644 --- a/packages/backend/src/server/api/api-handler.ts +++ b/packages/backend/src/server/api/api-handler.ts @@ -68,11 +68,11 @@ export default (endpoint: IEndpoint, ctx: Koa.Context) => new Promise((res } try { - UserIps.insert({ + UserIps.createQueryBuilder().insert().values({ createdAt: new Date(), userId: user.id, ip: ip, - }); + }).orIgnore(true).execute(); } catch { } }