mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-20 18:25:21 -04:00
Adjust editor config (#976)
* Adjust editor config Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Co-authored-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
parent
0180c75e55
commit
e12dc523f8
301 changed files with 4393 additions and 3741 deletions
|
@ -11,11 +11,11 @@ import { Revision, RevisionListEntry } from './types'
|
|||
const revisionCache = new Cache<string, Revision>(3600)
|
||||
|
||||
export const getRevision = async (noteId: string, timestamp: number): Promise<Revision> => {
|
||||
const cacheKey = `${noteId}:${timestamp}`
|
||||
const cacheKey = `${ noteId }:${ timestamp }`
|
||||
if (revisionCache.has(cacheKey)) {
|
||||
return revisionCache.get(cacheKey)
|
||||
}
|
||||
const response = await fetch(getApiUrl() + `/notes/${noteId}/revisions/${timestamp}`, {
|
||||
const response = await fetch(getApiUrl() + `/notes/${ noteId }/revisions/${ timestamp }`, {
|
||||
...defaultFetchConfig
|
||||
})
|
||||
expectResponseCode(response)
|
||||
|
@ -26,7 +26,7 @@ export const getRevision = async (noteId: string, timestamp: number): Promise<Re
|
|||
|
||||
export const getAllRevisions = async (noteId: string): Promise<RevisionListEntry[]> => {
|
||||
// TODO Change 'revisions-list' to 'revisions' as soon as the backend is ready to serve some data!
|
||||
const response = await fetch(getApiUrl() + `/notes/${noteId}/revisions-list`, {
|
||||
const response = await fetch(getApiUrl() + `/notes/${ noteId }/revisions-list`, {
|
||||
...defaultFetchConfig
|
||||
})
|
||||
expectResponseCode(response)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue