public async Task <IActionResult> PutUsertracker([FromRoute] int id, [FromBody] Usertracker usertracker) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != usertracker.Id) { return(BadRequest()); } _context.Entry(usertracker).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UsertrackerExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutYoutubekeys([FromRoute] int id, [FromBody] Youtubekeys youtubekeys) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != youtubekeys.Id) { return(BadRequest()); } _context.Entry(youtubekeys).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!YoutubekeysExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }