mirror of
https://github.com/Dvorinka/Containr.git
synced 2026-10-28 15:51:26 +00:00
feat(workspace): real database + template entry points in Add Service
type=database now provisions a managed database via POST /databases (engine + plan pickers) instead of a hollow service row; template source navigates to the existing catalog with the project preselected (/templates?project= now seeds the deploy target). api-client gains createManagedDatabase + DatabaseEntity from generated schemas. Authored By: TDvorak <[email protected]>
This commit is contained in:
1 parent
25703592c6
commit
e6e76c1084
4 files changed
+113
-15
No files matched your search
@@ -1231,6 +1231,22 @@ export async function listGitBranches(
|
||||
return payload.branches ?? [];
|
||||
}
|
||||
|
||||
export type CreateDatabaseInput = components['schemas']['CreateDatabaseRequest'];
|
||||
export type DatabaseEntity = components['schemas']['Database'];
|
||||
|
||||
export async function createManagedDatabase(
|
||||
input: CreateDatabaseInput,
|
||||
): Promise<{ id: string; status: string }> {
|
||||
const payload = await requestJson<{ id?: string; status?: string }>('/databases', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(input),
|
||||
});
|
||||
if (!payload.id) {
|
||||
throw new ApiError('Database response is invalid', 500);
|
||||
}
|
||||
return { id: payload.id, status: payload.status ?? 'building' };
|
||||
}
|
||||
|
||||
export type ConnectGitRepositoryInput = components['schemas']['ConnectGitRepoRequest'];
|
||||
export type CreateGitWebhookInput = components['schemas']['CreateWebhookRequest'];
|
||||
export type GitWebhookEntity = components['schemas']['GitWebhook'];
|
||||
|
||||
Reference in new issue
Block a user