Deployable hello function behind api gateway

This commit is contained in:
Ben Ramey
2018-09-18 06:50:29 -05:00
parent 5437fe88b0
commit 435060a764
6 changed files with 176 additions and 0 deletions

33
validators/schemas.js Normal file
View File

@@ -0,0 +1,33 @@
const answerSchema = {
"type": "object",
"properties": {
"user_id": {"type": "string"},
"question_id": {"type": "string"},
"is_correct": {"type": "boolean"}
},
"required": ["user_id", "question_id", "is_correct"]
};
const userSchema = {
"type": "object",
"properties": {
"id": {"type": "string"},
"score": {"type": "number"}
},
"required": ["user_id", "question_id", "is_correct"]
};
const loginFollowUpSchema = {
"type": "object",
"properties": {
"accessToken": {"type": "string"}
},
"required": ["accessToken"]
};
module.exports = {
answerSchema,
userSchema,
loginFollowUpSchema
};