From ebab08aee93a49c6e7bf1c71abac341ac6e8db29 Mon Sep 17 00:00:00 2001 From: Diane Huxley Date: Tue, 28 Mar 2023 13:21:41 -0700 Subject: [PATCH] Fix lint errors (#281) --- src/core/protocol-authorization.ts | 2 +- .../records/handlers/records-write.spec.ts | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/core/protocol-authorization.ts b/src/core/protocol-authorization.ts index d078ea315..f0ba1989b 100644 --- a/src/core/protocol-authorization.ts +++ b/src/core/protocol-authorization.ts @@ -1,10 +1,10 @@ +import type { Filter } from './types.js'; import type { MessageStore } from '../store/message-store.js'; import type { RecordsWrite } from '../interfaces/records/messages/records-write.js'; import type { RecordsWriteMessage } from '../interfaces/records/types.js'; import type { ProtocolDefinition, ProtocolRuleSet, ProtocolsConfigureMessage } from '../interfaces/protocols/types.js'; import { DwnInterfaceName, DwnMethodName, Message } from './message.js'; -import { Filter } from './types.js'; const methodToAllowedActionMap: Record = { [DwnMethodName.Write]: 'write', diff --git a/tests/interfaces/records/handlers/records-write.spec.ts b/tests/interfaces/records/handlers/records-write.spec.ts index f9a6d8352..64b2ae6c6 100644 --- a/tests/interfaces/records/handlers/records-write.spec.ts +++ b/tests/interfaces/records/handlers/records-write.spec.ts @@ -958,8 +958,8 @@ describe('RecordsWriteHandler.handle()', () => { } }, records: { - email: {}, - sms: {} + email : {}, + sms : {} } }; const protocolConfig = await TestDataGenerator.generateProtocolsConfigure({ @@ -976,7 +976,7 @@ describe('RecordsWriteHandler.handle()', () => { recipientDid : alice.did, protocol, schema : protocolDefinition.labels.email.schema, - data: Encoder.stringToBytes('any data'), + data : Encoder.stringToBytes('any data'), }); await dwn.processMessage(alice.did, emailRecordsWrite.message, emailRecordsWrite.dataStream); @@ -985,12 +985,12 @@ describe('RecordsWriteHandler.handle()', () => { recipientDid : alice.did, protocol, schema : protocolDefinition.labels.sms.schema, // SMS are allowed, but not as a child record of emails - data: Encoder.stringToBytes('any other data'), - parentId: emailRecordsWrite.message.recordId, - contextId: await emailRecordsWrite.recordsWrite.getEntryId() + data : Encoder.stringToBytes('any other data'), + parentId : emailRecordsWrite.message.recordId, + contextId : await emailRecordsWrite.recordsWrite.getEntryId() }); const reply = await dwn.processMessage(alice.did, smsSchemaResponse.message, smsSchemaResponse.dataStream); - + expect(reply.status.code).to.equal(401); expect(reply.status.detail).to.contain('record with schema: \'smsSchema\' not allowed in structure level 1'); });