mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 07:04:45 -04:00
Context menu to each history entry (#171)
- added entry-menu - added subsection in entry-menu with the location of the history entry and the action to remove an entry from history - added uploadAll functionality - show uploadAll Button in history only if the user is logged in - added deleteNote api call Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
107a8eeaaf
commit
72a161ea16
16 changed files with 238 additions and 110 deletions
10
src/api/note.ts
Normal file
10
src/api/note.ts
Normal file
|
@ -0,0 +1,10 @@
|
|||
import { expectResponseCode, getBackendUrl } from '../utils/apiUtils'
|
||||
import { defaultFetchConfig } from './default'
|
||||
|
||||
export const deleteNote = async (noteId: string): Promise<void> => {
|
||||
const response = await fetch(getBackendUrl() + `/notes/${noteId}`, {
|
||||
...defaultFetchConfig,
|
||||
method: 'DELETE'
|
||||
})
|
||||
expectResponseCode(response)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue