mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-05 03:32:16 +00:00
fix: validate applicationId
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
parent
66931fe24f
commit
653e5fa3a0
@@ -814,11 +814,18 @@ export const applicationRouter = createTRPCRouter({
|
|||||||
})
|
})
|
||||||
.input(uploadFileSchema)
|
.input(uploadFileSchema)
|
||||||
.mutation(async ({ input, ctx }) => {
|
.mutation(async ({ input, ctx }) => {
|
||||||
const zipFile = input.zip;
|
const zipFile = input.zip;
|
||||||
const applicationId = input.applicationId as string;
|
const applicationId = input.applicationId;
|
||||||
const dropBuildPath = input.dropBuildPath ?? null;
|
const dropBuildPath = input.dropBuildPath ?? null;
|
||||||
|
|
||||||
const app = await findApplicationById(applicationId);
|
if (!applicationId) {
|
||||||
|
throw new TRPCError({
|
||||||
|
code: "BAD_REQUEST",
|
||||||
|
message: "applicationId is required",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const app = await findApplicationById(applicationId);
|
||||||
|
|
||||||
if (
|
if (
|
||||||
app.environment.project.organizationId !==
|
app.environment.project.organizationId !==
|
||||||
|
|||||||
Reference in New Issue
Block a user