Example #1
0
        public async Task <IActionResult> UpdateTips([FromBody] LoadingScreenTip loadingScreenTip)
        {
            if (loadingScreenTip.Message.Length > 200)
            {
                return(new BadRequestObjectResult("The tip exceeded 200 characters. We can't display messages this long!"));
            }
            loadingScreenTip.Id = ObjectId.GenerateNewId();
            await _loadingScreenTipsRepository.UpsertTip(loadingScreenTip);

            return(Ok());
        }
 public Task UpsertTip(LoadingScreenTip loadingScreenTip)
 {
     return(Upsert(loadingScreenTip, n => n.Id == loadingScreenTip.Id));
 }
 public Task Save(LoadingScreenTip loadingScreenTip)
 {
     return(Insert(loadingScreenTip));
 }