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
This commit is contained in:
Divanshu Chauhan
2025-12-15 11:56:39 +05:30
parent 72cc7a2d2c
commit 8eaf2ab5c7
4 changed files with 4 additions and 4 deletions

View File

@@ -87,7 +87,7 @@ export const mariadbRouter = createTRPCRouter({
type: "volume",
});
return true;
return newMariadb;
} catch (error) {
if (error instanceof TRPCError) {
throw error;

View File

@@ -87,7 +87,7 @@ export const mongoRouter = createTRPCRouter({
type: "volume",
});
return true;
return newMongo;
} catch (error) {
if (error instanceof TRPCError) {
throw error;

View File

@@ -89,7 +89,7 @@ export const mysqlRouter = createTRPCRouter({
type: "volume",
});
return true;
return newMysql;
} catch (error) {
if (error instanceof TRPCError) {
throw error;

View File

@@ -91,7 +91,7 @@ export const postgresRouter = createTRPCRouter({
type: "volume",
});
return true;
return newPostgres;
} catch (error) {
if (error instanceof TRPCError) {
throw error;