mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Spelling and grammar corrections
This commit is contained in:
@@ -49,7 +49,7 @@ export const adminRouter = createTRPCRouter({
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message:
|
||||
"Error to create this user\ncheck if the email is not registered",
|
||||
"Error creating this user\ncheck if the email is not registered",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
@@ -70,7 +70,7 @@ export const adminRouter = createTRPCRouter({
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to delete this user",
|
||||
message: "Error deleting this user",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ export const applicationRouter = createTRPCRouter({
|
||||
}
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to create the application",
|
||||
message: "Error creating the application",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
@@ -441,7 +441,7 @@ export const applicationRouter = createTRPCRouter({
|
||||
if (!updateApp) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Update: Error to update application",
|
||||
message: "Error updating application",
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ export const authRouter = createTRPCRouter({
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
// @ts-ignore
|
||||
message: `Error: ${error?.code === "23505" ? "Email already exists" : "Error to create admin"}`,
|
||||
message: `Error: ${error?.code === "23505" ? "Email already exists" : "Error creating admin"}`,
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
@@ -111,7 +111,7 @@ export const authRouter = createTRPCRouter({
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to create the user",
|
||||
message: "Error creating the user",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
@@ -162,7 +162,7 @@ export const authRouter = createTRPCRouter({
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: `Error: ${error instanceof Error ? error.message : "Error to login"}`,
|
||||
message: `Error: ${error instanceof Error ? error.message : "Login error"}`,
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ export const backupRouter = createTRPCRouter({
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to create the Backup",
|
||||
message: "Error creating the Backup",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
@@ -113,7 +113,7 @@ export const backupRouter = createTRPCRouter({
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to update this Backup",
|
||||
message: "Error updating this Backup",
|
||||
});
|
||||
}
|
||||
}),
|
||||
@@ -135,7 +135,7 @@ export const backupRouter = createTRPCRouter({
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to delete this Backup",
|
||||
message: "Error deleting this Backup",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
@@ -152,7 +152,7 @@ export const backupRouter = createTRPCRouter({
|
||||
console.log(error);
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to run manual postgres backup ",
|
||||
message: "Error running manual Postgres backup ",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
@@ -169,7 +169,7 @@ export const backupRouter = createTRPCRouter({
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to run manual mysql backup ",
|
||||
message: "Error running manual MySQL backup ",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
@@ -185,7 +185,7 @@ export const backupRouter = createTRPCRouter({
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to run manual mariadb backup ",
|
||||
message: "Error running manual Mariadb backup ",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
@@ -201,7 +201,7 @@ export const backupRouter = createTRPCRouter({
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to run manual mongo backup ",
|
||||
message: "Error running manual Mongo backup ",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ export const bitbucketRouter = createTRPCRouter({
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to create this bitbucket provider",
|
||||
message: "Error creating this Bitbucket provider",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ export const clusterRouter = createTRPCRouter({
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "INTERNAL_SERVER_ERROR",
|
||||
message: "Error to remove the node",
|
||||
message: "Error removing the node",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ export const composeRouter = createTRPCRouter({
|
||||
} catch (err) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to fetch source type",
|
||||
message: "Error fetching source type",
|
||||
cause: err,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ export const destinationRouter = createTRPCRouter({
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to create the destination",
|
||||
message: "Error creating the destination",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
@@ -75,7 +75,7 @@ export const destinationRouter = createTRPCRouter({
|
||||
message:
|
||||
error instanceof Error
|
||||
? error?.message
|
||||
: "Error to connect to bucket",
|
||||
: "Error connecting to bucket",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ export const domainRouter = createTRPCRouter({
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to create the domain",
|
||||
message: "Error creating the domain",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -32,14 +32,14 @@ export const gitProviderRouter = createTRPCRouter({
|
||||
// TODO: Remove isCloud in the next versions of dokploy
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not allowed to delete this git provider",
|
||||
message: "You are not allowed to delete this Git provider",
|
||||
});
|
||||
}
|
||||
return await removeGitProvider(input.gitProviderId);
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to delete this git provider",
|
||||
message: "Error deleting this Git provider",
|
||||
});
|
||||
}
|
||||
}),
|
||||
|
||||
@@ -30,7 +30,7 @@ export const gitlabRouter = createTRPCRouter({
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to create this gitlab provider",
|
||||
message: "Error creating this Gitlab provider",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
@@ -43,7 +43,7 @@ export const gitlabRouter = createTRPCRouter({
|
||||
//TODO: Remove this line when the cloud version is ready
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not allowed to access this gitlab provider",
|
||||
message: "You are not allowed to access this Gitlab provider",
|
||||
});
|
||||
}
|
||||
return gitlabProvider;
|
||||
@@ -82,7 +82,7 @@ export const gitlabRouter = createTRPCRouter({
|
||||
//TODO: Remove this line when the cloud version is ready
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not allowed to access this gitlab provider",
|
||||
message: "You are not allowed to access this Gitlab provider",
|
||||
});
|
||||
}
|
||||
return await getGitlabRepositories(input.gitlabId);
|
||||
@@ -96,7 +96,7 @@ export const gitlabRouter = createTRPCRouter({
|
||||
//TODO: Remove this line when the cloud version is ready
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not allowed to access this gitlab provider",
|
||||
message: "You are not allowed to access this Gitlab provider",
|
||||
});
|
||||
}
|
||||
return await getGitlabBranches(input);
|
||||
@@ -113,7 +113,7 @@ export const gitlabRouter = createTRPCRouter({
|
||||
//TODO: Remove this line when the cloud version is ready
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not allowed to access this gitlab provider",
|
||||
message: "You are not allowed to access this Gitlab provider",
|
||||
});
|
||||
}
|
||||
const result = await testGitlabConnection(input);
|
||||
@@ -134,7 +134,7 @@ export const gitlabRouter = createTRPCRouter({
|
||||
//TODO: Remove this line when the cloud version is ready
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not allowed to access this gitlab provider",
|
||||
message: "You are not allowed to access this Gitlab provider",
|
||||
});
|
||||
}
|
||||
if (input.name) {
|
||||
|
||||
@@ -41,7 +41,7 @@ export const mariadbRouter = createTRPCRouter({
|
||||
if (IS_CLOUD && !input.serverId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You need to use a server to create a mariadb",
|
||||
message: "You need to use a server to create a Mariadb",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ export const mariadbRouter = createTRPCRouter({
|
||||
if (mariadb.project.adminId !== ctx.user.adminId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not authorized to access this mariadb",
|
||||
message: "You are not authorized to access this Mariadb",
|
||||
});
|
||||
}
|
||||
return mariadb;
|
||||
@@ -96,7 +96,7 @@ export const mariadbRouter = createTRPCRouter({
|
||||
if (service.project.adminId !== ctx.user.adminId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not authorized to start this mariadb",
|
||||
message: "You are not authorized to start this Mariadb",
|
||||
});
|
||||
}
|
||||
if (service.serverId) {
|
||||
@@ -149,7 +149,7 @@ export const mariadbRouter = createTRPCRouter({
|
||||
if (mariadb.project.adminId !== ctx.user.adminId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not authorized to deploy this mariadb",
|
||||
message: "You are not authorized to deploy this Mariadb",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ export const mariadbRouter = createTRPCRouter({
|
||||
if (mongo.project.adminId !== ctx.user.adminId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not authorized to change this mariadb status",
|
||||
message: "You are not authorized to change this Mariadb status",
|
||||
});
|
||||
}
|
||||
await updateMariadbById(input.mariadbId, {
|
||||
@@ -181,7 +181,7 @@ export const mariadbRouter = createTRPCRouter({
|
||||
if (mongo.project.adminId !== ctx.user.adminId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not authorized to delete this mariadb",
|
||||
message: "You are not authorized to delete this Mariadb",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ export const mariadbRouter = createTRPCRouter({
|
||||
if (!service) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Update: Error to add environment variables",
|
||||
message: "Error adding environment variables",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -228,7 +228,7 @@ export const mariadbRouter = createTRPCRouter({
|
||||
if (mariadb.project.adminId !== ctx.user.adminId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not authorized to reload this mariadb",
|
||||
message: "You are not authorized to reload this Mariadb",
|
||||
});
|
||||
}
|
||||
if (mariadb.serverId) {
|
||||
@@ -258,7 +258,7 @@ export const mariadbRouter = createTRPCRouter({
|
||||
if (mariadb.project.adminId !== ctx.user.adminId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not authorized to update this mariadb",
|
||||
message: "You are not authorized to update this Mariadb",
|
||||
});
|
||||
}
|
||||
const service = await updateMariadbById(mariadbId, {
|
||||
@@ -268,7 +268,7 @@ export const mariadbRouter = createTRPCRouter({
|
||||
if (!service) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Update: Error to update mariadb",
|
||||
message: "Update: Error updating Mariadb",
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -257,7 +257,7 @@ export const mongoRouter = createTRPCRouter({
|
||||
if (!service) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Update: Error to add environment variables",
|
||||
message: "Error adding environment variables",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -281,7 +281,7 @@ export const mongoRouter = createTRPCRouter({
|
||||
if (!service) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Update: Error to update mongo",
|
||||
message: "Update: Error updating Mongo",
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ export const mysqlRouter = createTRPCRouter({
|
||||
if (IS_CLOUD && !input.serverId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You need to use a server to create a mysql",
|
||||
message: "You need to use a server to create a MySQL",
|
||||
});
|
||||
}
|
||||
1;
|
||||
@@ -74,7 +74,7 @@ export const mysqlRouter = createTRPCRouter({
|
||||
}
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error input: Inserting mysql database",
|
||||
message: "Error input: Inserting MySQL database",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
@@ -89,7 +89,7 @@ export const mysqlRouter = createTRPCRouter({
|
||||
if (mysql.project.adminId !== ctx.user.adminId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not authorized to access this mysql",
|
||||
message: "You are not authorized to access this MySQL",
|
||||
});
|
||||
}
|
||||
return mysql;
|
||||
@@ -102,7 +102,7 @@ export const mysqlRouter = createTRPCRouter({
|
||||
if (service.project.adminId !== ctx.user.adminId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not authorized to start this mysql",
|
||||
message: "You are not authorized to start this MySQL",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ export const mysqlRouter = createTRPCRouter({
|
||||
if (mongo.project.adminId !== ctx.user.adminId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not authorized to stop this mysql",
|
||||
message: "You are not authorized to stop this MySQL",
|
||||
});
|
||||
}
|
||||
if (mongo.serverId) {
|
||||
@@ -161,7 +161,7 @@ export const mysqlRouter = createTRPCRouter({
|
||||
if (mysql.project.adminId !== ctx.user.adminId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not authorized to deploy this mysql",
|
||||
message: "You are not authorized to deploy this MySQL",
|
||||
});
|
||||
}
|
||||
return deployMySql(input.mysqlId);
|
||||
@@ -173,7 +173,7 @@ export const mysqlRouter = createTRPCRouter({
|
||||
if (mongo.project.adminId !== ctx.user.adminId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not authorized to change this mysql status",
|
||||
message: "You are not authorized to change this MySQL status",
|
||||
});
|
||||
}
|
||||
await updateMySqlById(input.mysqlId, {
|
||||
@@ -188,7 +188,7 @@ export const mysqlRouter = createTRPCRouter({
|
||||
if (mysql.project.adminId !== ctx.user.adminId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not authorized to reload this mysql",
|
||||
message: "You are not authorized to reload this MySQL",
|
||||
});
|
||||
}
|
||||
if (mysql.serverId) {
|
||||
@@ -219,7 +219,7 @@ export const mysqlRouter = createTRPCRouter({
|
||||
if (mongo.project.adminId !== ctx.user.adminId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not authorized to delete this mysql",
|
||||
message: "You are not authorized to delete this MySQL",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -253,7 +253,7 @@ export const mysqlRouter = createTRPCRouter({
|
||||
if (!service) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Update: Error to add environment variables",
|
||||
message: "Error adding environment variables",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -267,7 +267,7 @@ export const mysqlRouter = createTRPCRouter({
|
||||
if (mysql.project.adminId !== ctx.user.adminId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not authorized to update this mysql",
|
||||
message: "You are not authorized to update this MySQL",
|
||||
});
|
||||
}
|
||||
const service = await updateMySqlById(mysqlId, {
|
||||
@@ -277,7 +277,7 @@ export const mysqlRouter = createTRPCRouter({
|
||||
if (!service) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Update: Error to update mysql",
|
||||
message: "Update: Error updating MySQL",
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ export const notificationRouter = createTRPCRouter({
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to create the notification",
|
||||
message: "Error creating the notification",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
@@ -87,7 +87,7 @@ export const notificationRouter = createTRPCRouter({
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to test the notification",
|
||||
message: "Error testing the notification",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
@@ -100,7 +100,7 @@ export const notificationRouter = createTRPCRouter({
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to create the notification",
|
||||
message: "Error creating the notification",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
@@ -125,7 +125,7 @@ export const notificationRouter = createTRPCRouter({
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to update the notification",
|
||||
message: "Error updating the notification",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
@@ -139,7 +139,7 @@ export const notificationRouter = createTRPCRouter({
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to test the notification",
|
||||
message: "Error testing the notification",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
@@ -152,7 +152,7 @@ export const notificationRouter = createTRPCRouter({
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to create the notification",
|
||||
message: "Error creating the notification",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
@@ -177,7 +177,7 @@ export const notificationRouter = createTRPCRouter({
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to update the notification",
|
||||
message: "Error updating the notification",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
@@ -200,7 +200,7 @@ export const notificationRouter = createTRPCRouter({
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to test the notification",
|
||||
message: "Error testing the notification",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
@@ -213,7 +213,7 @@ export const notificationRouter = createTRPCRouter({
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to create the notification",
|
||||
message: "Error creating the notification",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
@@ -237,7 +237,7 @@ export const notificationRouter = createTRPCRouter({
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to update the notification",
|
||||
message: "Error updating the notification",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
@@ -255,7 +255,7 @@ export const notificationRouter = createTRPCRouter({
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to test the notification",
|
||||
message: "Error testing the notification",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
@@ -276,7 +276,7 @@ export const notificationRouter = createTRPCRouter({
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to delete this notification",
|
||||
message: "Error deleting this notification",
|
||||
});
|
||||
}
|
||||
}),
|
||||
|
||||
@@ -58,7 +58,7 @@ export const portRouter = createTRPCRouter({
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to updating port",
|
||||
message: "Error updating the port",
|
||||
});
|
||||
}
|
||||
}),
|
||||
|
||||
@@ -40,7 +40,7 @@ export const postgresRouter = createTRPCRouter({
|
||||
if (IS_CLOUD && !input.serverId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You need to use a server to create a postgres",
|
||||
message: "You need to use a server to create a Postgres",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ export const postgresRouter = createTRPCRouter({
|
||||
}
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error input: Inserting postgresql database",
|
||||
message: "Error input: Inserting Postgres database",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
@@ -87,7 +87,7 @@ export const postgresRouter = createTRPCRouter({
|
||||
if (postgres.project.adminId !== ctx.user.adminId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not authorized to access this postgres",
|
||||
message: "You are not authorized to access this Postgres",
|
||||
});
|
||||
}
|
||||
return postgres;
|
||||
@@ -101,7 +101,7 @@ export const postgresRouter = createTRPCRouter({
|
||||
if (service.project.adminId !== ctx.user.adminId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not authorized to start this postgres",
|
||||
message: "You are not authorized to start this Postgres",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ export const postgresRouter = createTRPCRouter({
|
||||
if (postgres.project.adminId !== ctx.user.adminId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not authorized to stop this postgres",
|
||||
message: "You are not authorized to stop this Postgres",
|
||||
});
|
||||
}
|
||||
if (postgres.serverId) {
|
||||
@@ -161,7 +161,7 @@ export const postgresRouter = createTRPCRouter({
|
||||
if (postgres.project.adminId !== ctx.user.adminId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not authorized to deploy this postgres",
|
||||
message: "You are not authorized to deploy this Postgres",
|
||||
});
|
||||
}
|
||||
return deployPostgres(input.postgresId);
|
||||
@@ -173,7 +173,7 @@ export const postgresRouter = createTRPCRouter({
|
||||
if (postgres.project.adminId !== ctx.user.adminId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not authorized to change this postgres status",
|
||||
message: "You are not authorized to change this Postgres status",
|
||||
});
|
||||
}
|
||||
await updatePostgresById(input.postgresId, {
|
||||
@@ -192,7 +192,7 @@ export const postgresRouter = createTRPCRouter({
|
||||
if (postgres.project.adminId !== ctx.user.adminId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not authorized to delete this postgres",
|
||||
message: "You are not authorized to delete this Postgres",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ export const postgresRouter = createTRPCRouter({
|
||||
if (!service) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Update: Error to add environment variables",
|
||||
message: "Error adding environment variables",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -235,7 +235,7 @@ export const postgresRouter = createTRPCRouter({
|
||||
if (postgres.project.adminId !== ctx.user.adminId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not authorized to reload this postgres",
|
||||
message: "You are not authorized to reload this Postgres",
|
||||
});
|
||||
}
|
||||
if (postgres.serverId) {
|
||||
@@ -265,7 +265,7 @@ export const postgresRouter = createTRPCRouter({
|
||||
if (postgres.project.adminId !== ctx.user.adminId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not authorized to update this postgres",
|
||||
message: "You are not authorized to update this Postgres",
|
||||
});
|
||||
}
|
||||
const service = await updatePostgresById(postgresId, {
|
||||
@@ -275,7 +275,7 @@ export const postgresRouter = createTRPCRouter({
|
||||
if (!service) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Update: Error to update postgres",
|
||||
message: "Error updating Postgres",
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ export const projectRouter = createTRPCRouter({
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: `Error to create the project: ${error instanceof Error ? error.message : error}`,
|
||||
message: `Error creating the project: ${error instanceof Error ? error.message : error}`,
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ export const redisRouter = createTRPCRouter({
|
||||
if (IS_CLOUD && !input.serverId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You need to use a server to create a redis",
|
||||
message: "You need to use a server to create a Redis",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ export const redisRouter = createTRPCRouter({
|
||||
if (redis.project.adminId !== ctx.user.adminId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not authorized to access this redis",
|
||||
message: "You are not authorized to access this Redis",
|
||||
});
|
||||
}
|
||||
return redis;
|
||||
@@ -95,7 +95,7 @@ export const redisRouter = createTRPCRouter({
|
||||
if (redis.project.adminId !== ctx.user.adminId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not authorized to start this redis",
|
||||
message: "You are not authorized to start this Redis",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ export const redisRouter = createTRPCRouter({
|
||||
if (redis.project.adminId !== ctx.user.adminId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not authorized to reload this redis",
|
||||
message: "You are not authorized to reload this Redis",
|
||||
});
|
||||
}
|
||||
if (redis.serverId) {
|
||||
@@ -147,7 +147,7 @@ export const redisRouter = createTRPCRouter({
|
||||
if (redis.project.adminId !== ctx.user.adminId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not authorized to stop this redis",
|
||||
message: "You are not authorized to stop this Redis",
|
||||
});
|
||||
}
|
||||
if (redis.serverId) {
|
||||
@@ -184,7 +184,7 @@ export const redisRouter = createTRPCRouter({
|
||||
if (redis.project.adminId !== ctx.user.adminId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not authorized to deploy this redis",
|
||||
message: "You are not authorized to deploy this Redis",
|
||||
});
|
||||
}
|
||||
return deployRedis(input.redisId);
|
||||
@@ -196,7 +196,7 @@ export const redisRouter = createTRPCRouter({
|
||||
if (mongo.project.adminId !== ctx.user.adminId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not authorized to change this redis status",
|
||||
message: "You are not authorized to change this Redis status",
|
||||
});
|
||||
}
|
||||
await updateRedisById(input.redisId, {
|
||||
@@ -216,7 +216,7 @@ export const redisRouter = createTRPCRouter({
|
||||
if (redis.project.adminId !== ctx.user.adminId) {
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not authorized to delete this redis",
|
||||
message: "You are not authorized to delete this Redis",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -250,7 +250,7 @@ export const redisRouter = createTRPCRouter({
|
||||
if (!updatedRedis) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Update: Error to add environment variables",
|
||||
message: "Error adding environment variables",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -267,7 +267,7 @@ export const redisRouter = createTRPCRouter({
|
||||
if (!redis) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Update: Error to update redis",
|
||||
message: "Error updating Redis",
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ export const registryRouter = createTRPCRouter({
|
||||
if (!application) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Update: Error to update registry",
|
||||
message: "Error updating registry",
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ export const serverRouter = createTRPCRouter({
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to create the server",
|
||||
message: "Error creating the server",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -748,7 +748,7 @@ export const settingsRouter = createTRPCRouter({
|
||||
message:
|
||||
error instanceof Error
|
||||
? error.message
|
||||
: "Error to update Traefik ports",
|
||||
: "Error updating Traefik ports",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ export const sshRouter = createTRPCRouter({
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to create the ssh key",
|
||||
message: "Error creating the SSH key",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
@@ -45,7 +45,7 @@ export const sshRouter = createTRPCRouter({
|
||||
// TODO: Remove isCloud in the next versions of dokploy
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not allowed to delete this ssh key",
|
||||
message: "You are not allowed to delete this SSH key",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ export const sshRouter = createTRPCRouter({
|
||||
// TODO: Remove isCloud in the next versions of dokploy
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not allowed to access this ssh key",
|
||||
message: "You are not allowed to access this SSH key",
|
||||
});
|
||||
}
|
||||
return sshKey;
|
||||
@@ -89,14 +89,14 @@ export const sshRouter = createTRPCRouter({
|
||||
// TODO: Remove isCloud in the next versions of dokploy
|
||||
throw new TRPCError({
|
||||
code: "UNAUTHORIZED",
|
||||
message: "You are not allowed to update this ssh key",
|
||||
message: "You are not allowed to update this SSH key",
|
||||
});
|
||||
}
|
||||
return await updateSSHKeyById(input);
|
||||
} catch (error) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message: "Error to update this ssh key",
|
||||
message: "Error updating this SSH key",
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ const clearDb = async (): Promise<void> => {
|
||||
console.log(tables);
|
||||
await pg.end();
|
||||
} catch (error) {
|
||||
console.error("Error to clean database", error);
|
||||
console.error("Error cleaning database", error);
|
||||
} finally {
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,7 +11,7 @@ export const getPublicIpWithFallback = async () => {
|
||||
ip = await publicIpv4();
|
||||
} catch (error) {
|
||||
console.log(
|
||||
"Error to obtain public IPv4 address, falling back to IPv6",
|
||||
"Error obtaining public IPv4 address, falling back to IPv6",
|
||||
// @ts-ignore
|
||||
error.message,
|
||||
);
|
||||
@@ -19,7 +19,7 @@ export const getPublicIpWithFallback = async () => {
|
||||
ip = await publicIpv6();
|
||||
} catch (error) {
|
||||
// @ts-ignore
|
||||
console.error("Error to obtain public IPv6 address", error.message);
|
||||
console.error("Error obtaining public IPv6 address", error.message);
|
||||
ip = null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user