Unknown race condition fix

This commit is contained in:
zkldi
2021-07-21 23:15:09 +01:00
parent d800cdafd4
commit b657a7f35b
+2 -2
View File
@@ -27,8 +27,8 @@ export async function CreateFakeAuthCookie(mockApi: supertest.SuperTest<supertes
// my local dev env hates this part because of pnpm
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function InsertFakeTokenWithAllPerms(token: string): () => any {
return () => {
db["api-tokens"].insert({
return async () => {
await db["api-tokens"].insert({
userID: 1,
identifier: "Mock API Token",
permissions: AllPermissions,