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, 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;

View File

@ -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,
}, },

View File

@ -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();

View File

@ -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,
}, },
}); });