diff --git a/services/credential-schema/src/schema/schema.service.spec.ts b/services/credential-schema/src/schema/schema.service.spec.ts index 56e9b28d2..2392fd1fc 100644 --- a/services/credential-schema/src/schema/schema.service.spec.ts +++ b/services/credential-schema/src/schema/schema.service.spec.ts @@ -126,7 +126,7 @@ describe('SchemaService', () => { expect(updatedSchema).toBeDefined(); expect(updatedSchema.tags).toEqual(['test1', 'test2']); expect(updatedSchema.schema.version).toBe('1.1.0'); - expect(updatedSchema.status).toBe('DRAFT'); + expect(updatedSchema.status).toBe('PUBLISHED'); }); it('should try updating the schema fields of a DRAFT Schema', async () => { const didBody = generateTestDIDBody(); @@ -174,7 +174,7 @@ describe('SchemaService', () => { expect(updatedSchema).toBeDefined(); expect(updatedSchema.schema.version).toBe('2.0.0'); - expect(updatedSchema.status).toBe('DRAFT'); + expect(updatedSchema.status).toBe('PUBLISHED'); expect(updatedSchema.schema.author).toBe(pschema.schema.id); }); }); diff --git a/services/credential-schema/src/schema/schema.service.ts b/services/credential-schema/src/schema/schema.service.ts index 2a87ba8c9..770145243 100644 --- a/services/credential-schema/src/schema/schema.service.ts +++ b/services/credential-schema/src/schema/schema.service.ts @@ -385,11 +385,9 @@ export class SchemaService { newStatus = SchemaStatus.REVOKED; break; case 'DRAFT': - newStatus = SchemaStatus.REVOKED; + newStatus = SchemaStatus.DRAFT; break; default: - // newStatus = SchemaStatus.DRAFT; - Logger.warn('Unknown schema status, setting to draft'); throw new BadRequestException( 'Invalid status value. Supported values are: 1. DRAFT 2. DEPRECATED 3. REVOKED 4. PUBLISHED', );