Exemplo n.º 1
0
        /// <summary>
        /// Adds new user record to the db.
        /// </summary>
        /// <param name="user"></param>
        public async Task Add(UserModel user, string token)
        {
            try
            {
                await VerfiyToken(token);

                await _usersRepository.AddOrUpdate(user);
            }
            catch (AuthenticationException)
            {
                throw new AuthenticationException();
            }
            catch (Exception e)
            {
                throw new Exception();
            }
        }