Beispiel #1
0
        public ModelMessageResult <TagModel> handleEdited(TagModel model, IUpdater <TagModel> updater)
        {
            var           req    = new TagUpdateRequest(updater.createRequestModel(model));
            MessageResult result = APIRequest.updateTag(req).GetAwaiter().GetResult();

            Result <TagModel> get_result = APIRequest.getTagById(req.Id).GetAwaiter().GetResult();

            return(new ModelMessageResult <TagModel>(result.Error, result.Message, get_result.Items.FirstOrDefault()));
        }
Beispiel #2
0
        public static async Task <MessageResult> updateTag(TagUpdateRequest model)
        {
            var response = await client.PatchAsJsonAsync(TAGS + $"{model.Id}", model);

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