enhance modals and terms of use html

This commit is contained in:
Patrick Jentsch
2024-12-23 14:49:06 +01:00
parent d4cd313940
commit 80604bf8de
11 changed files with 357 additions and 397 deletions

View File

@ -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}`);
}
}