mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 22:54:42 -04:00
Reorganize redux and hooks (1/4) (#985)
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
parent
bdf8110676
commit
1b7abf9f27
61 changed files with 898 additions and 986 deletions
|
@ -15,15 +15,17 @@ export interface Note {
|
|||
id: string
|
||||
alias: string
|
||||
lastChange: LastChange
|
||||
viewcount: number
|
||||
createtime: number
|
||||
viewCount: number
|
||||
createTime: number
|
||||
content: string
|
||||
authorship: number[]
|
||||
preVersionTwoNote: boolean
|
||||
}
|
||||
|
||||
export const getNote = async (noteId: string): Promise<Note> => {
|
||||
const response = await fetch(getApiUrl() + `/notes/${noteId}`, {
|
||||
// The "-get" suffix is necessary, because in our mock api (filesystem) the note id might already be a folder.
|
||||
// TODO: [mrdrogdrog] replace -get with actual api route as soon as api backend is ready.
|
||||
const response = await fetch(getApiUrl() + `/notes/${noteId}-get`, {
|
||||
...defaultFetchConfig
|
||||
})
|
||||
expectResponseCode(response)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue