diff --git a/api/controllers/Docker.ts b/api/controllers/Docker.ts index e74d7ad..98134bf 100644 --- a/api/controllers/Docker.ts +++ b/api/controllers/Docker.ts @@ -10,7 +10,7 @@ export default new class DeployContainer { const { secret } = req.params try { - const deploy = await deployQuery.findDeploy(secret, req.userId) + const deploy = await deployQuery.findDeploy(secret) const containers = await containerQuery.findContainers(deploy.id) await actions.startDeployRoutine(actions, containers, deploy) resp.returnSucessMessage(res, 'Implantação concluída com sucesso') diff --git a/api/query/deployQuery.ts b/api/query/deployQuery.ts index a640304..ea942b2 100644 --- a/api/query/deployQuery.ts +++ b/api/query/deployQuery.ts @@ -2,10 +2,10 @@ import { knex } from '../db/connection' import * as I from '../interface/Interfaces' export default new class DeployQuery { - public async findDeploy (secret: string, userId: number): Promise { + public async findDeploy (secret: string): Promise { try { const deploy: I.Deploy[] = await knex('deploys') - .where({ secret: secret, userIdFk: userId }) + .where({ secret: secret }) .select() return deploy[0]