Add custom domain support for auctions flow
This commit is contained in:
parent
13cc0f8b9b
commit
285d0e86bf
@ -345,10 +345,11 @@ export const createResolvers = async (service: Service): Promise<any> => {
|
|||||||
{
|
{
|
||||||
projectId,
|
projectId,
|
||||||
deploymentId,
|
deploymentId,
|
||||||
}: { deploymentId: string; projectId: string },
|
deployerId,
|
||||||
|
}: { deploymentId: string; projectId: string, deployerId: string },
|
||||||
) => {
|
) => {
|
||||||
try {
|
try {
|
||||||
return await service.rollbackDeployment(projectId, deploymentId);
|
return await service.rollbackDeployment(projectId, deploymentId, deployerId);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
log(err);
|
log(err);
|
||||||
return false;
|
return false;
|
||||||
|
@ -1193,6 +1193,7 @@ export class Service {
|
|||||||
async rollbackDeployment(
|
async rollbackDeployment(
|
||||||
projectId: string,
|
projectId: string,
|
||||||
deploymentId: string,
|
deploymentId: string,
|
||||||
|
deployerId: string,
|
||||||
): Promise<boolean> {
|
): Promise<boolean> {
|
||||||
// TODO: Implement transactions
|
// TODO: Implement transactions
|
||||||
const oldCurrentDeployment = await this.db.getDeployment({
|
const oldCurrentDeployment = await this.db.getDeployment({
|
||||||
@ -1204,6 +1205,9 @@ export class Service {
|
|||||||
project: {
|
project: {
|
||||||
id: projectId,
|
id: projectId,
|
||||||
},
|
},
|
||||||
|
deployer: {
|
||||||
|
deployerId
|
||||||
|
},
|
||||||
isCurrent: true,
|
isCurrent: true,
|
||||||
isCanonical: false,
|
isCanonical: false,
|
||||||
},
|
},
|
||||||
|
@ -99,6 +99,7 @@ export const DeploymentMenu = ({
|
|||||||
const isRollbacked = await client.rollbackDeployment(
|
const isRollbacked = await client.rollbackDeployment(
|
||||||
project.id,
|
project.id,
|
||||||
deployment.id,
|
deployment.id,
|
||||||
|
deployment.deployer.deployerId
|
||||||
);
|
);
|
||||||
if (isRollbacked.rollbackDeployment) {
|
if (isRollbacked.rollbackDeployment) {
|
||||||
await onUpdate();
|
await onUpdate();
|
||||||
|
@ -337,13 +337,15 @@ export class GQLClient {
|
|||||||
|
|
||||||
async rollbackDeployment(
|
async rollbackDeployment(
|
||||||
projectId: string,
|
projectId: string,
|
||||||
deploymentId: string
|
deploymentId: string,
|
||||||
|
deployerId: string,
|
||||||
): Promise<types.RollbackDeploymentResponse> {
|
): Promise<types.RollbackDeploymentResponse> {
|
||||||
const { data } = await this.client.mutate({
|
const { data } = await this.client.mutate({
|
||||||
mutation: mutations.rollbackDeployment,
|
mutation: mutations.rollbackDeployment,
|
||||||
variables: {
|
variables: {
|
||||||
projectId,
|
projectId,
|
||||||
deploymentId,
|
deploymentId,
|
||||||
|
deployerId,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user