public async Task <IActionResult> PutExcalidraw(int id, Excalidraw excalidraw)
        {
            Excalidraw og = _context.Excalidraws.AsNoTracking().ToList().First(s => s.ID == id);

            // Return a bad request if the ID is invalid, or if the date of document being
            // put is earlier than the one currently being stored there.
            if (id != excalidraw.ID || (excalidraw.lastSaved.CompareTo(og.lastSaved) < 0))
            {
                return(BadRequest());
            }

            _context.Entry(excalidraw).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!ExcalidrawExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
        public async Task <ActionResult <Excalidraw> > PostExcalidraw(Excalidraw excalidraw)
        {
            _context.Excalidraws.Add(excalidraw);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetExcalidraw", new { id = excalidraw.ID }, excalidraw));
        }