Skip to content

Commit

Permalink
fix conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
mistermoe committed Apr 18, 2023
1 parent 41a0966 commit 2e88aba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 4 additions & 1 deletion src/interfaces/messages/handlers/messages-get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 2e88aba

Please sign in to comment.