Skip to content

Commit 8eaf2ab

Browse files
committed
fix(api): return database object from create endpoints
Database creation APIs (mysql, mariadb, postgres, mongo) now return the created database object with databaseID instead of boolean true. This enables automation workflows to deploy databases immediately after creation. Fixes #3268
1 parent 72cc7a2 commit 8eaf2ab

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

apps/dokploy/server/api/routers/mariadb.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export const mariadbRouter = createTRPCRouter({
8787
type: "volume",
8888
});
8989

90-
return true;
90+
return newMariadb;
9191
} catch (error) {
9292
if (error instanceof TRPCError) {
9393
throw error;

apps/dokploy/server/api/routers/mongo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export const mongoRouter = createTRPCRouter({
8787
type: "volume",
8888
});
8989

90-
return true;
90+
return newMongo;
9191
} catch (error) {
9292
if (error instanceof TRPCError) {
9393
throw error;

apps/dokploy/server/api/routers/mysql.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export const mysqlRouter = createTRPCRouter({
8989
type: "volume",
9090
});
9191

92-
return true;
92+
return newMysql;
9393
} catch (error) {
9494
if (error instanceof TRPCError) {
9595
throw error;

apps/dokploy/server/api/routers/postgres.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export const postgresRouter = createTRPCRouter({
9191
type: "volume",
9292
});
9393

94-
return true;
94+
return newPostgres;
9595
} catch (error) {
9696
if (error instanceof TRPCError) {
9797
throw error;

0 commit comments

Comments
 (0)