fix: Allow FreeBSD to start Backend without any issues

This commit is contained in:
Marie 2025-02-06 22:54:47 +01:00
parent 8a087e75a5
commit 24528ed0c3
6 changed files with 305 additions and 147 deletions

View file

@ -58,7 +58,7 @@ export class UserListService implements OnApplicationShutdown, OnModuleInit {
}
async onModuleInit() {
this.roleService = this.moduleRef.get(RoleService.name);
this.roleService = this.moduleRef.get(RoleService);
}
@bindThis

View file

@ -8,7 +8,7 @@
* https://en.wikipedia.org/wiki/Identicon
*/
import { createCanvas } from '@napi-rs/canvas';
import { createCanvas } from 'canvas';
import gen from 'random-seed';
const size = 128; // px
@ -100,5 +100,5 @@ export async function genIdenticon(seed: string): Promise<Buffer> {
}
}
return await canvas.encode('png');
return await canvas.toBuffer('image/png');
}