mirror of
https://github.com/andwati/dokploy.git
synced 2026-10-27 23:42:15 +00:00
chore(docs): update api.json endpoints
This commit is contained in:
+1
-1
@@ -104,7 +104,7 @@ export const SaveGitlabProvider = ({ applicationId }: Props) => {
|
||||
{
|
||||
owner: repository?.owner,
|
||||
repo: repository?.repo,
|
||||
id: repository?.id,
|
||||
id: repository?.id || 0,
|
||||
gitlabId: gitlabId,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -60,7 +60,9 @@ export const EditTraefikEnv = ({ children }: Props) => {
|
||||
}, [form, form.reset, data]);
|
||||
|
||||
const onSubmit = async (data: Schema) => {
|
||||
await mutateAsync(data.env)
|
||||
await mutateAsync({
|
||||
env: data.env,
|
||||
})
|
||||
.then(async () => {
|
||||
toast.success("Traefik Env Updated");
|
||||
})
|
||||
|
||||
@@ -301,6 +301,10 @@ export const settingsRouter = createTRPCRouter({
|
||||
"mongo",
|
||||
"mariadb",
|
||||
"sshRouter",
|
||||
"gitProvider",
|
||||
"bitbucket",
|
||||
"github",
|
||||
"gitlab",
|
||||
],
|
||||
});
|
||||
|
||||
@@ -322,9 +326,9 @@ export const settingsRouter = createTRPCRouter({
|
||||
}),
|
||||
|
||||
writeTraefikEnv: adminProcedure
|
||||
.input(z.string())
|
||||
.input(z.object({ env: z.string() }))
|
||||
.mutation(async ({ input }) => {
|
||||
const envs = prepareEnvironmentVariables(input);
|
||||
const envs = prepareEnvironmentVariables(input.env);
|
||||
await initializeTraefik({
|
||||
env: envs,
|
||||
});
|
||||
|
||||
@@ -54,7 +54,7 @@ export const apiGitlabTestConnection = createSchema
|
||||
.pick({ gitlabId: true, groupName: true });
|
||||
|
||||
export const apiFindGitlabBranches = z.object({
|
||||
id: z.number().nullable(),
|
||||
id: z.number().optional(),
|
||||
owner: z.string(),
|
||||
repo: z.string(),
|
||||
gitlabId: z.string().optional(),
|
||||
|
||||
@@ -208,12 +208,12 @@ export const getGitlabRepositories = async (gitlabId?: string) => {
|
||||
};
|
||||
|
||||
export const getGitlabBranches = async (input: {
|
||||
id: number | null;
|
||||
id?: number;
|
||||
gitlabId?: string;
|
||||
owner: string;
|
||||
repo: string;
|
||||
}) => {
|
||||
if (!input.gitlabId || !input.id) {
|
||||
if (!input.gitlabId || !input.id || input.id === 0) {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user