Skip to content

Commit

Permalink
fix: read should return content
Browse files Browse the repository at this point in the history
  • Loading branch information
falk-werner committed Jan 20, 2024
1 parent 5ef4b41 commit c85177a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/fakenoteprovider.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ class Note {
content;
tags;

constructor(name) {
constructor(name, content) {
this.name = name;
this.content = "";
this.content = content || "";
this.tags = [];
}
}
Expand All @@ -19,7 +19,7 @@ class FakeNoteProvider extends NoteProvider {
constructor() {
super();
this.#notes = new Map([
["Sample", new Note("Sample")]
["Sample", new Note("Sample", "# Sample Note\n")]
]);
}

Expand All @@ -35,7 +35,7 @@ class FakeNoteProvider extends NoteProvider {

async read(name) {
const note = this.#get_note(name);
return note.name;
return note.content;
}

async create() {
Expand Down

0 comments on commit c85177a

Please sign in to comment.