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());
        }
        public async Task PutZahtev(int id, string tekst, bool?prihvacen)
        {
            var zahtev = await _context.Zahtevi.FindAsync(id);

            if (tekst != null && tekst != "null")
            {
                zahtev.Tekst = tekst;
            }
            if (prihvacen != null)
            {
                zahtev.Prihvacen = prihvacen;
            }
            //zahtev.Vreme = DateTime.Now;
            _context.Zahtevi.Update(zahtev);
            await _context.SaveChangesAsync();
        }