Add custom domain support for auctions flow

This commit is contained in:
Shreerang Kale 2025-02-05 16:02:47 +05:30
parent 13cc0f8b9b
commit 285d0e86bf
4 changed files with 11 additions and 3 deletions

View File

@ -345,10 +345,11 @@ export const createResolvers = async (service: Service): Promise<any> => {
{
projectId,
deploymentId,
}: { deploymentId: string; projectId: string },
deployerId,
}: { deploymentId: string; projectId: string, deployerId: string },
) => {
try {
return await service.rollbackDeployment(projectId, deploymentId);
return await service.rollbackDeployment(projectId, deploymentId, deployerId);
} catch (err) {
log(err);
return false;

View File

@ -1193,6 +1193,7 @@ export class Service {
async rollbackDeployment(
projectId: string,
deploymentId: string,
deployerId: string,
): Promise<boolean> {
// TODO: Implement transactions
const oldCurrentDeployment = await this.db.getDeployment({
@ -1204,6 +1205,9 @@ export class Service {
project: {
id: projectId,
},
deployer: {
deployerId
},
isCurrent: true,
isCanonical: false,
},

View File

@ -99,6 +99,7 @@ export const DeploymentMenu = ({
const isRollbacked = await client.rollbackDeployment(
project.id,
deployment.id,
deployment.deployer.deployerId
);
if (isRollbacked.rollbackDeployment) {
await onUpdate();

View File

@ -337,13 +337,15 @@ export class GQLClient {
async rollbackDeployment(
projectId: string,
deploymentId: string
deploymentId: string,
deployerId: string,
): Promise<types.RollbackDeploymentResponse> {
const { data } = await this.client.mutate({
mutation: mutations.rollbackDeployment,
variables: {
projectId,
deploymentId,
deployerId,
},
});