Exemple #1
0
        public MessageResult handleDeleted(UserModel model)
        {
            var req = new UserUpdateRequest(model);

            return(APIRequest.adminRemoveOtherAccount(req).GetAwaiter().GetResult());
        }
Exemple #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());
        }
Exemple #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>());
        }
Exemple #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>());
        }
Exemple #5
0
        public static async Task <MessageResult> removeOwnAccount(UserUpdateRequest login)
        {
            var response = await client.DeleteAsJsonAsync(USERS, login);

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