Exemplo n.º 1
0
        public async Task <IActionResult> Register(KorisnikRequestModel korisnikReq)
        {
            ServiceResponse <int> response = await _authRepo.Register(new Korisnik { Username = korisnikReq.Username }, korisnikReq.Password);

            return(Ok(response));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Login(KorisnikRequestModel korisnikReq)
        {
            ServiceResponse <string> response = await _authRepo.Login(korisnikReq.Username, korisnikReq.Password);

            return(Ok(response));
        }