Example #1
0
 def post(self):
     data = request.json
     ECN = data['ECN']
     CFN = data['CFN']
     return {
         "family_identifiers": FormController.familyIdentifiers(ECN, CFN, AnswerMembersCollection)
     }
Example #2
0
 def get(self):
     CFN = request.args['CFN']
     ECN = request.args['ECN']
     number = request.args['number']
     res = FormController.findSection(
         formAnswerCollection, ECN, CFN, number)
     if res:
         return res
     return None
Example #3
0
 def post(self):
     data = request.json
     ECN = data['ECN']
     CFN = data['CFN']
     message, success = FormController.confirmForm(
         formAnswerCollection, ECN, CFN)
     return {
         'message': message,
         'success': success
     }
Example #4
0
 def post(self):
     form = request.json
     CFN = form['CFN']
     ECN = form['ECN']
     print(form)
     messages, success = FormController.insertAnswersPeople(
         AnswerMembersCollection, ECN, CFN, form)
     return {
         "messages": messages,
         "success": success
     }
Example #5
0
 def put(self):
     data = request.json
     CFN = request.args['CFN']
     ECN = request.args['ECN']
     number = request.args['number']
     message, success = FormController.updateSection(
         formAnswerCollection, CFN, ECN, number, data)
     return {
         'message': message,
         'success': success
     }
Example #6
0
    def post(self):
        data = request.json
        start = data['start']
        if start:
            messages, success = FormController.censusNight(
                formAnswerCollection, AnswerMembersCollection, formAnswerCollection_CN, AnswerMembersCollection_CN)
        else:
            messages = 'No start Census Night'
            success = False

        return {
            "messages": messages,
            "success": success
        }
Example #7
0
 def post(self):
     data = request.json
     Form = FormController.getFormByPeople(AnswerMembersCollection, data)
     return {
         "form": Form}
Example #8
0
 def get(self):
     data = FormController.getStatistics(
         formAnswerCollection, db.collector_codes)
     return data