public MessageResult handleDeleted(UserModel model) { var req = new UserUpdateRequest(model); return(APIRequest.adminRemoveOtherAccount(req).GetAwaiter().GetResult()); }
public static MessageResult attemptRemoveAccount(string name, string password) { var req = new UserUpdateRequest(new UserModel(0, name, password, 0)); return(APIRequest.removeOwnAccount(req).GetAwaiter().GetResult()); }
public static async Task <TokenIDMessageResult> adminRemoveOtherAccount(UserUpdateRequest model) { var response = await client.DeleteAsJsonAsync(USERS + $"admin/{model.Id}", model); return(await response.Content.ReadAsAsync <TokenIDMessageResult>()); }
public static async Task <MessageResult> changeUserType(UserUpdateRequest model) { var response = await client.PatchAsJsonAsync(USERS + "/change-user-type", model); return(await response.Content.ReadAsAsync <MessageResult>()); }
public static async Task <MessageResult> removeOwnAccount(UserUpdateRequest login) { var response = await client.DeleteAsJsonAsync(USERS, login); return(await response.Content.ReadAsAsync <MessageResult>()); }