mirror of
https://github.com/Afilmory/afilmory
synced 2026-04-24 23:05:05 +00:00
- Added site settings management with a dedicated UI for configuration. - Introduced new onboarding steps for site branding, including site name, title, and description. - Updated API endpoints for site settings retrieval and updates. - Enhanced the onboarding wizard to include site settings integration. - Refactored related components and hooks for better state management and validation. Signed-off-by: Innei <tukon479@gmail.com>
31 lines
651 B
TypeScript
31 lines
651 B
TypeScript
import type { FetchResponse } from 'ofetch'
|
|
|
|
import { coreApi } from '~/lib/api-client'
|
|
|
|
export interface RegisterTenantAccountPayload {
|
|
email: string
|
|
password: string
|
|
name: string
|
|
}
|
|
|
|
export interface RegisterTenantPayload {
|
|
account: RegisterTenantAccountPayload
|
|
tenant: {
|
|
name: string
|
|
slug: string | null
|
|
}
|
|
settings?: Array<{
|
|
key: string
|
|
value: unknown
|
|
}>
|
|
}
|
|
|
|
export type RegisterTenantResult = FetchResponse<unknown>
|
|
|
|
export async function registerTenant(payload: RegisterTenantPayload): Promise<RegisterTenantResult> {
|
|
return await coreApi.raw('/auth/sign-up/email', {
|
|
method: 'POST',
|
|
body: payload,
|
|
})
|
|
}
|