delete note do be working
This commit is contained in:
parent
b49a4c3ddf
commit
2eeda6fc5c
4 changed files with 18 additions and 23 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import type {Note} from "../types";
|
||||
import type {Note} from "./types";
|
||||
|
||||
export interface NoteRepository {
|
||||
getNotes(): Promise<Note[]>;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type {Note} from "../types";
|
||||
import type {Note} from "./types";
|
||||
import {parseCookies} from "nookies";
|
||||
import type {NoteRepository} from "./NoteRepository";
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ export class StrapiNoteRepository implements NoteRepository {
|
|||
let requestInit: RequestInit = {
|
||||
method: method,
|
||||
headers: {
|
||||
authorization: StrapiNoteRepository.mockedGetAuthorizationHeader()
|
||||
authorization: StrapiNoteRepository.getAuthorizationHeader()
|
||||
}
|
||||
};
|
||||
if (body) {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
export interface Note {
|
||||
id: number;
|
||||
attributes: Attribute;
|
||||
}
|
||||
|
||||
export interface Attribute {
|
||||
title: string;
|
||||
content: string;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue