コード例 #1
0
        public MessageResult handleDeleted(UserModel model)
        {
            var req = new UserUpdateRequest(model);

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

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