merge: Enable FreeBSD to be used for deployment (!887)

View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/887

Closes #928

Approved-by: dakkar <dakkar@thenautilus.net>
Approved-by: Hazelnoot <acomputerdog@gmail.com>
This commit is contained in:
Marie 2025-02-07 20:37:50 +00:00
commit 9731a614a1
5 changed files with 304 additions and 146 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');
}