I can't see the topic on category page when I use db.objects.insert
Unsolved
Technical Support
-
I successfully create 7/new-topic-example page by using the command below, but it is not listed on category page and home page. Is this correct way to insert data?
db.objects.insert({_key:"topic:7","cid":2,"lastposttime":1625553855706,"mainPid":7,"postcount":22,"slug":"7/new-topic-example","tid":7,"timestamp":1625553855705,"title":"new topic example","uid":1,"viewcount":33,"postercount":22})
Many Thanks
Khaled -
The correct way to insert data would be to use the http write API. Doing it via direct db operations is much more complicated than what you did.
-
@pitaj I successfully post a topic through API.
But I am wondering how I can send multi topic on one requestLike:
{ "cid": 2, "title": "Test topic 1", "content": "1 This is the test topic's content", }, { "cid": 2, "title": "Test topic 2", "content": "2 This is the test topic's content", }
Copyright © 2024 NodeBB | Contributors