Made Mission marker DB compatible

This commit is contained in:
PxlLoewe
2025-04-24 22:32:18 -07:00
parent 46cbdf6bb9
commit 5bca37182d
22 changed files with 445 additions and 187 deletions

View File

@@ -0,0 +1,20 @@
import { User } from "../../generated/client";
export interface PublicUser {
firstname: string;
lastname: string;
publicId: string;
badges: string[];
}
export const getPublicUser = (user: User): PublicUser => {
return {
firstname: user.firstname,
lastname: user.lastname
.split(" ")
.map((part) => `${part[0]}.`)
.join(" "), // Only take the first part of the name
publicId: user.publicId,
badges: user.badges,
};
};