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:
Philip Molares 2020-06-09 22:35:09 +02:00 committed by GitHub
parent 107a8eeaaf
commit 72a161ea16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 238 additions and 110 deletions

10
src/api/note.ts Normal file
View 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)
}