mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-22 14:47:56 +01:00
Persistency improvements
This commit is contained in:
parent
859fcad6a6
commit
9e92b87495
@ -74,7 +74,8 @@ class RESTPersistenceManager extends PersistenceManager {
|
|||||||
`${this.documentUrl.replace('{id}', mapId)}?${query}`,
|
`${this.documentUrl.replace('{id}', mapId)}?${query}`,
|
||||||
{
|
{
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
body: JSON.stringify(data),
|
// Blob helps to resuce the memory on large payload.
|
||||||
|
body: new Blob([JSON.stringify(data)], { type: 'text/plain' }),
|
||||||
headers: { 'Content-Type': 'application/json; charset=utf-8', Accept: 'application/json' },
|
headers: { 'Content-Type': 'application/json; charset=utf-8', Accept: 'application/json' },
|
||||||
keepalive: true,
|
keepalive: true,
|
||||||
},
|
},
|
||||||
@ -131,11 +132,11 @@ class RESTPersistenceManager extends PersistenceManager {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
unlockMap(mapId: string):void {
|
unlockMap(mapId: string): void {
|
||||||
fetch(
|
fetch(
|
||||||
this.lockUrl.replace('{id}', mapId),
|
this.lockUrl.replace('{id}', mapId),
|
||||||
{
|
{
|
||||||
method: 'POST',
|
method: 'PUT',
|
||||||
headers: { 'Content-Type': 'text/plain' },
|
headers: { 'Content-Type': 'text/plain' },
|
||||||
body: 'false',
|
body: 'false',
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user