Module backend.questions

This file handles the functionality for saved questions in JobTrackr. There are functions for deleting questions, adding questions, viewing questions, and modifying questions. These functions are all within the context of the current user.

Functions

def add_question(Questions)

Add a question to the system for the given user.

Request:
{
    email: string  
    question: string
    answer: string
}
Response:
{
    status: boolean
    data: message (Success / Error message as per status)

}
def delete_question(Questions)

Delete a question from the system for the given user.

Request:
{
    email: string,  
    id: number
}
Response:
{
    status: boolean
    data: message (Success / Error message as per status)

}
def modify_question(Questions)

Modifies a question in the system for a given user.

Request:
{
    email: string  
    id: number
    question: string
    answer: string
}
Response:
{
    status: 200
    data: Success message

    status: 400
    data: Error message

}
def view_questions(Questions)

View questions in the system for the given user.

Request:
{
    email: string  
}
Response:
{
    status: 200
    data: Success message

    status: 400
    data: Error message

}