CMU-313 / nodebb-f24-team-kale

cmu-313-f24-nodebb-f24-NodeBB created by GitHub Classroom
GNU General Public License v3.0
0 stars 3 forks source link

US2-2: API functions modifying anonymous status in database #17

Open luciafang opened 2 days ago

luciafang commented 2 days ago

Description Extend the API route responsible for posting a question to handle the new isAnonymous flag. The route should accept the flag as part of the request body and save it in the database.

Estimated Effort 3 hours

Dependencies

16

Acceptance Criteria The question submission API accepts an optional isAnonymous boolean in the request body. If isAnonymous is true, the question is saved with the isAnonymous field set to true in the database. The API performs proper validation and defaults isAnonymous to false if not provided.