feat: Allow users to disable marking offline automatically (#6079)

Co-authored-by: Nithin David <1277421+nithindavid@users.noreply.github.com>
This commit is contained in:
Pranav Raj S
2022-12-16 11:59:27 -08:00
committed by GitHub
parent 82d3398932
commit aaacf9d4d2
14 changed files with 188 additions and 14 deletions

View File

@@ -144,6 +144,12 @@ export default {
});
},
updateAutoOffline(accountId, autoOffline = false) {
return axios.post(endPoints('autoOffline').url, {
profile: { account_id: accountId, auto_offline: autoOffline },
});
},
deleteAvatar() {
return axios.delete(endPoints('deleteAvatar').url);
},

View File

@@ -16,6 +16,9 @@ const endPoints = {
availabilityUpdate: {
url: '/api/v1/profile/availability',
},
autoOffline: {
url: '/api/v1/profile/auto_offline',
},
logout: {
url: 'auth/sign_out',
},