mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
feat(api): closes #9123 category and topic routes migrated to Write API
This commit is contained in:
@@ -12,6 +12,10 @@ const uploadsController = require('../uploads');
|
||||
|
||||
const Topics = module.exports;
|
||||
|
||||
Topics.get = async (req, res) => {
|
||||
helpers.formatApiResponse(200, res, await api.topics.get(req, req.params));
|
||||
};
|
||||
|
||||
Topics.create = async (req, res) => {
|
||||
const payload = await api.topics.create(req, req.body);
|
||||
if (payload.queued) {
|
||||
|
||||
Reference in New Issue
Block a user