From 8eaf2ab5c757170464553d91e06174690e0c86b0 Mon Sep 17 00:00:00 2001 From: Divanshu Chauhan Date: Mon, 15 Dec 2025 11:56:39 +0530 Subject: [PATCH] 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 --- apps/dokploy/server/api/routers/mariadb.ts | 2 +- apps/dokploy/server/api/routers/mongo.ts | 2 +- apps/dokploy/server/api/routers/mysql.ts | 2 +- apps/dokploy/server/api/routers/postgres.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/dokploy/server/api/routers/mariadb.ts b/apps/dokploy/server/api/routers/mariadb.ts index 18950b7a3..7d4bd2e50 100644 --- a/apps/dokploy/server/api/routers/mariadb.ts +++ b/apps/dokploy/server/api/routers/mariadb.ts @@ -87,7 +87,7 @@ export const mariadbRouter = createTRPCRouter({ type: "volume", }); - return true; + return newMariadb; } catch (error) { if (error instanceof TRPCError) { throw error; diff --git a/apps/dokploy/server/api/routers/mongo.ts b/apps/dokploy/server/api/routers/mongo.ts index 51b830fc8..ae0fa4741 100644 --- a/apps/dokploy/server/api/routers/mongo.ts +++ b/apps/dokploy/server/api/routers/mongo.ts @@ -87,7 +87,7 @@ export const mongoRouter = createTRPCRouter({ type: "volume", }); - return true; + return newMongo; } catch (error) { if (error instanceof TRPCError) { throw error; diff --git a/apps/dokploy/server/api/routers/mysql.ts b/apps/dokploy/server/api/routers/mysql.ts index 5edb27da4..5204fedc8 100644 --- a/apps/dokploy/server/api/routers/mysql.ts +++ b/apps/dokploy/server/api/routers/mysql.ts @@ -89,7 +89,7 @@ export const mysqlRouter = createTRPCRouter({ type: "volume", }); - return true; + return newMysql; } catch (error) { if (error instanceof TRPCError) { throw error; diff --git a/apps/dokploy/server/api/routers/postgres.ts b/apps/dokploy/server/api/routers/postgres.ts index 3112beb66..e1718bff1 100644 --- a/apps/dokploy/server/api/routers/postgres.ts +++ b/apps/dokploy/server/api/routers/postgres.ts @@ -91,7 +91,7 @@ export const postgresRouter = createTRPCRouter({ type: "volume", }); - return true; + return newPostgres; } catch (error) { if (error instanceof TRPCError) { throw error;