Part of my application involves creating a test (i.e., selecting an X-number from the questions of filtered questions). The user is able to determine how big a test they want but to do this, I need to calculate on the server how many questions are available. The function that creates a test is sent through this post:
app post ('/ user / created_tate', users.create_test);
As the user changes the filter, I want to set the number of available questions ... all I can think is to use the AJAX post to send the filter information, but It will be passed to do the same thing as creating an exam ... Is there a way to post to the same URL, but to determine which function do you execute?
- Consider creating another function - the best method for the perfect API
- Consider the name of
app.post ('/ user / test')
. - The second function may be
app.post ('/ user
.
- Consider the name of
- or request a single post and make sure Make sure that your function both creates and filters.
In general, the lack of app design maturity is reconsidering client-server communication.
No comments:
Post a Comment