mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-15 18:40:40 +00:00
enhance modals and terms of use html
This commit is contained in:
@ -21,16 +21,16 @@ nopaque.app.endpoints.Users = class Users {
|
||||
async subscribe(userId) {
|
||||
const response = await this.app.socket.emitWithAck('SUBSCRIBE User', userId);
|
||||
|
||||
if (response.status != 200) {
|
||||
throw new Error(`[${response.status}] ${response.statusText}`);
|
||||
if (response.code != 204) {
|
||||
throw new Error(`${response.name}: ${response.description}`);
|
||||
}
|
||||
}
|
||||
|
||||
async unsubscribe(userId) {
|
||||
const response = await this.app.socket.emitWithAck('UNSUBSCRIBE User', userId);
|
||||
|
||||
if (response.status != 200) {
|
||||
throw new Error(`[${response.status}] ${response.statusText}`);
|
||||
if (response.status != 204) {
|
||||
throw new Error(`${response.name}: ${response.description}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user