mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-14 01:50:40 +00:00
Change the user session SocketIO Logic
This commit is contained in:
@ -96,7 +96,7 @@ class CorpusFileList extends RessourceList {
|
||||
}
|
||||
}
|
||||
|
||||
usersPatchHandler(patch) {
|
||||
onPATCH(patch) {
|
||||
let corpusFileId;
|
||||
let filteredPatch;
|
||||
let match;
|
||||
|
@ -88,7 +88,7 @@ class CorpusList extends RessourceList {
|
||||
}
|
||||
}
|
||||
|
||||
usersPatchHandler(patch) {
|
||||
onPATCH(patch) {
|
||||
let corpusId;
|
||||
let filteredPatch;
|
||||
let match;
|
||||
|
@ -54,5 +54,5 @@ class JobInputList extends RessourceList {
|
||||
}
|
||||
}
|
||||
|
||||
usersPatchHandler(patch) {return;}
|
||||
onPATCH(patch) {return;}
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ class JobList extends RessourceList {
|
||||
}
|
||||
}
|
||||
|
||||
usersPatchHandler(patch) {
|
||||
onPATCH(patch) {
|
||||
let filteredPatch;
|
||||
let jobId;
|
||||
let match;
|
||||
|
@ -57,7 +57,7 @@ class JobResultList extends RessourceList {
|
||||
}
|
||||
}
|
||||
|
||||
usersPatchHandler(patch) {
|
||||
onPATCH(patch) {
|
||||
let filteredPatch;
|
||||
let operation;
|
||||
let re;
|
||||
|
@ -89,7 +89,7 @@ class QueryResultList extends RessourceList {
|
||||
}
|
||||
}
|
||||
|
||||
usersPatchHandler(patch) {
|
||||
onPATCH(patch) {
|
||||
let filteredPatch;
|
||||
let match;
|
||||
let operation;
|
||||
|
@ -91,10 +91,10 @@ class RessourceList {
|
||||
this.userId = this.listjs.listContainer.dataset.userId;
|
||||
this.listjs.list.addEventListener('click', event => this.onclick(event));
|
||||
if (this.userId) {
|
||||
app.addEventListener('users.patch', patch => this.usersPatchHandler(patch));
|
||||
app.getUserById(this.userId).then(
|
||||
user => this.init(user),
|
||||
error => {throw JSON.stringify(error);}
|
||||
app.socket.on('PATCH', (patch) => {this.onPATCH(patch);});
|
||||
app.subscribeUser(this.userId).then(
|
||||
(user) => {this.init(user);},
|
||||
(error) => {throw JSON.stringify(error);}
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -117,7 +117,7 @@ class RessourceList {
|
||||
|
||||
onclick(event) {throw 'Not implemented';}
|
||||
|
||||
usersPatchHandler(patch) {throw 'Not implemented';}
|
||||
onPATCH(patch) {throw 'Not implemented';}
|
||||
|
||||
add(ressources) {
|
||||
let values = Array.isArray(ressources) ? ressources : [ressources];
|
||||
|
Reference in New Issue
Block a user