Esempio n. 1
0
        public static async Task <Challenge> postChallengeQuestion(User user, Challenge challenge, int offerId)
        {
            string route = !String.IsNullOrEmpty(user.id) ? APIRoutes.challengeAnswerSubmissionWithUserIdRoute(user.id, challenge.skillsTestQuestion.id, offerId) :
                           APIRoutes.challengeAnswerSubmissionWithExternalIdRoute(user.external_id, challenge.skillsTestQuestion.id, offerId);
            SMResponse m = await AsyncClient.post(route, ConstructSMRequest(challenge));

            return(m == null ? null : m.challenge);
        }