feat: add initial storage module
This commit is contained in:
@@ -23,6 +23,8 @@ export class DashboardController extends Controller<{
|
||||
}
|
||||
}
|
||||
|
||||
async createUser() {}
|
||||
|
||||
async #subscribe() {
|
||||
await loadBeneficiaries();
|
||||
this.#subscriptions.push(
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
);
|
||||
|
||||
@@ -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>;
|
||||
|
||||
Reference in New Issue
Block a user