public async Task <IActionResult> PutAdmin(int id, Admin admin)
        {
            if (id != admin.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutPredavac(int id, Predavac predavac)
        {
            if (id != predavac.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }