Esempio n. 1
0
        public Responce getAppointedUser(HttpListenerRequest request)
        {
            Animal animal = parseAnimal(request);

            User user = userRepository.findOneByAnimal(animal);

            if (user != null)
            {
                return(Responce.ok((UserPlane)user));
            }

            return(Responce.notFound());
        }
Esempio n. 2
0
        public Responce feedToday(HttpListenerRequest request)
        {
            Animal animal = parseAnimal(request);

            User user = userRepository.findOneByAnimal(animal);

            if (user != null)
            {
                user.feedTheAnimal(animal);
                return(Responce.ok(user));
            }

            return(Responce.notFound());
        }
Esempio n. 3
0
 public Responce noController(HttpListenerRequest request)
 {
     return(Responce.notFound());
 }