feat: add initial storage module

This commit is contained in:
2026-01-09 01:42:57 +01:00
parent 7336cfd411
commit 304c7969b2
60 changed files with 5988 additions and 107 deletions

View File

@@ -23,6 +23,8 @@ export class DashboardController extends Controller<{
}
}
async createUser() {}
async #subscribe() {
await loadBeneficiaries();
this.#subscriptions.push(

View File

@@ -1,4 +1,3 @@
import { account } from "@module/account/client";
import { payment } from "@module/payment/client";
import { HttpAdapter, makeClient, type RelayResponse } from "@platform/relay";
@@ -9,7 +8,6 @@ export const api = makeClient(
}),
},
{
account,
payment,
},
);

View File

@@ -73,7 +73,12 @@ export class User {
}
function getUserProfile({ profile }: ZitadelUser): Profile {
const user: Profile = { id: profile.client_id as string, name: "Unknown", email: "unknown@acme.none", avatar: "" };
const user: Profile = {
id: profile.client_id as string,
name: "Unknown",
email: "unknown@acme.none",
avatar: "",
};
if (profile.name) {
user.name = profile.name;
} else if (profile.given_name && profile.family_name) {
@@ -87,7 +92,7 @@ function getUserProfile({ profile }: ZitadelUser): Profile {
if (profile.picture !== undefined) {
user.avatar = profile.picture;
}
return user;
return ProfileSchema.parse(user);
}
type Tenant = z.output<typeof TenantSchema>;