Skip to content

Commit

Permalink
Fix lint errors (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
Diane Huxley authored Mar 28, 2023
1 parent 04345b0 commit ebab08a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/core/protocol-authorization.ts
Original file line number Diff line number Diff line change
@@ -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<string, string> = {
[DwnMethodName.Write]: 'write',
Expand Down
14 changes: 7 additions & 7 deletions tests/interfaces/records/handlers/records-write.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -958,8 +958,8 @@ describe('RecordsWriteHandler.handle()', () => {
}
},
records: {
email: {},
sms: {}
email : {},
sms : {}
}
};
const protocolConfig = await TestDataGenerator.generateProtocolsConfigure({
Expand All @@ -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);

Expand All @@ -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');
});
Expand Down

0 comments on commit ebab08a

Please sign in to comment.