Esempio n. 1
0
        public MessageResult handleDeleted(UserModel model)
        {
            var req = new UserUpdateRequest(model);

            return(APIRequest.adminRemoveOtherAccount(req).GetAwaiter().GetResult());
        }
Esempio n. 2
0
        public static MessageResult attemptRemoveAccount(string name, string password)
        {
            var req = new UserUpdateRequest(new UserModel(0, name, password, 0));

            return(APIRequest.removeOwnAccount(req).GetAwaiter().GetResult());
        }
Esempio n. 3
0
        public static async Task <TokenIDMessageResult> adminRemoveOtherAccount(UserUpdateRequest model)
        {
            var response = await client.DeleteAsJsonAsync(USERS + $"admin/{model.Id}", model);

            return(await response.Content.ReadAsAsync <TokenIDMessageResult>());
        }
Esempio n. 4
0
        public static async Task <MessageResult> changeUserType(UserUpdateRequest model)
        {
            var response = await client.PatchAsJsonAsync(USERS + "/change-user-type", model);

            return(await response.Content.ReadAsAsync <MessageResult>());
        }
Esempio n. 5
0
        public static async Task <MessageResult> removeOwnAccount(UserUpdateRequest login)
        {
            var response = await client.DeleteAsJsonAsync(USERS, login);

            return(await response.Content.ReadAsAsync <MessageResult>());
        }