Add topic creation, subscription editing

This commit is contained in:
Ben Goldsworthy 2021-03-25 13:55:42 +00:00
parent 215f46658e
commit d62f816df3
10 changed files with 176 additions and 4 deletions

View file

@ -147,8 +147,26 @@ export class ApiService {
{ session_key : key }
);
}
public getTopicsAndSubscriptions() {
const key = this.sessionKey;
return this.http.post<any>(
this.apiUrl + '/topics/subscriptions',
{ session_key : key }
);
}
public updateSubscriptions(data) {
data.session_key = this.sessionKey;
data.test = "Foo";
return this.http.post<any>(
this.apiUrl + '/topics/update',
data
);
}
public sendMessage(data) {
data.session_key = this.sessionKey;
data.sender = localStorage.getItem('displayname');
return this.http.post<any>(
this.apiUrl + '/send-message',