feat(acls): refactor & acl descriptions

This commit is contained in:
DecDuck
2025-02-07 17:26:23 +11:00
parent 090d2e6586
commit 0877638fc4
23 changed files with 291 additions and 253 deletions

View File

@ -3,6 +3,7 @@ import prisma from "~/server/internal/db/database";
import { createHash } from "~/server/internal/security/simple";
import { v4 as uuidv4 } from "uuid";
import * as jdenticon from "jdenticon";
import objectHandler from "~/server/internal/objects";
// Only really a simple test, in case people mistype their emails
const mailRegex = /^\S+@\S+\.\S+$/;
@ -88,7 +89,7 @@ export default defineEventHandler(async (h3) => {
const userId = uuidv4();
const profilePictureId = uuidv4();
await h3.context.objects.createFromSource(
await objectHandler.createFromSource(
profilePictureId,
async () => jdenticon.toPng(username, 256),
{},