address review

pull/518/head
sachaaaaa 6 years ago
parent 7756d4f0f3
commit e2e2d1e845

@ -294,19 +294,11 @@ class LokiAppDotNetServerAPI {
// Only one annotation at a time
async setSelfAnnotation(type, value) {
let annotation;
const doDelete = !value;
const annotation = { type };
if (doDelete) {
// to delete annotation, omit the "value" field
annotation = {
type,
};
} else {
annotation = {
type,
value,
};
// to delete annotation, omit the "value" field
if (value) {
annotation.value = value;
}
const res = await this.serverRequest('users/me', {

Loading…
Cancel
Save