diff --git a/README.md b/README.md index 8abf85069..c2346a11a 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ # Decentralized Web Node (DWN) SDK Code Coverage -![Statements](https://img.shields.io/badge/statements-93.83%25-brightgreen.svg?style=flat) ![Branches](https://img.shields.io/badge/branches-93.35%25-brightgreen.svg?style=flat) ![Functions](https://img.shields.io/badge/functions-91.51%25-brightgreen.svg?style=flat) ![Lines](https://img.shields.io/badge/lines-93.83%25-brightgreen.svg?style=flat) +![Statements](https://img.shields.io/badge/statements-93.83%25-brightgreen.svg?style=flat) ![Branches](https://img.shields.io/badge/branches-93.34%25-brightgreen.svg?style=flat) ![Functions](https://img.shields.io/badge/functions-91.51%25-brightgreen.svg?style=flat) ![Lines](https://img.shields.io/badge/lines-93.83%25-brightgreen.svg?style=flat) ## Introduction diff --git a/src/interfaces/messages/handlers/messages-get.ts b/src/interfaces/messages/handlers/messages-get.ts index bd505f54e..add0db839 100644 --- a/src/interfaces/messages/handlers/messages-get.ts +++ b/src/interfaces/messages/handlers/messages-get.ts @@ -14,6 +14,7 @@ import { DwnInterfaceName, DwnMethodName, Message } from '../../../core/message. type HandleArgs = { tenant: string, message: MessagesGetMessage }; +const RecordsWrite = DwnInterfaceName.Records + DwnMethodName.Write; export class MessagesGetHandler implements MethodHandler { constructor(private didResolver: DidResolver, private messageStore: MessageStore, private dataStore: DataStore) {} @@ -62,7 +63,9 @@ export class MessagesGetHandler implements MethodHandler { } const { interface: messageInterface, method } = message.descriptor; - if (messageInterface !== DwnInterfaceName.Records || method !== DwnMethodName.Write) { + const interfaceMethod = `${messageInterface}${method}`; + + if (interfaceMethod !== RecordsWrite) { continue; }