コード例 #1
0
        public async Task <IActionResult> ColourNote(int noteId, ColourRequestModel colourRequest)
        {
            var userId = TokenUserId();

            if (await note.ColourNote(noteId, userId, colourRequest))
            {
                string status = "color changed successfully";
                return(Ok(new { status, userId, noteId, colourRequest }));
            }
            else
            {
                string status = "color is not changed.";
                return(BadRequest(new { status, userId, noteId, colourRequest }));
            }
        }