mirror of
https://github.com/PretendoNetwork/miiverse-api.git
synced 2026-03-21 17:24:38 -05:00
Added missing result elements to some responses
This commit is contained in:
parent
d1fb023869
commit
ea41488347
|
|
@ -155,13 +155,15 @@ router.get('/:appID/posts', async function (request: express.Request, response:
|
|||
}
|
||||
|
||||
const json: Record<string, any> = {
|
||||
has_error: 0,
|
||||
version: 1,
|
||||
request_name: 'posts',
|
||||
topic: {
|
||||
community_id: community.community_id
|
||||
},
|
||||
posts: []
|
||||
result: {
|
||||
has_error: 0,
|
||||
version: 1,
|
||||
request_name: 'posts',
|
||||
topic: {
|
||||
community_id: community.community_id
|
||||
},
|
||||
posts: []
|
||||
}
|
||||
};
|
||||
|
||||
for (const post of posts) {
|
||||
|
|
|
|||
|
|
@ -70,11 +70,13 @@ router.get('/', async function (request: express.Request, response: express.Resp
|
|||
}
|
||||
|
||||
const json: Record<string, any> = {
|
||||
has_error: 0,
|
||||
version: 1,
|
||||
expire: moment().add(1, 'days').format('YYYY-MM-DD HH:MM:SS'),
|
||||
request_name: 'posts',
|
||||
people: []
|
||||
result: {
|
||||
has_error: 0,
|
||||
version: 1,
|
||||
expire: moment().add(1, 'days').format('YYYY-MM-DD HH:MM:SS'),
|
||||
request_name: 'posts',
|
||||
people: []
|
||||
}
|
||||
};
|
||||
|
||||
for (const post of posts) {
|
||||
|
|
|
|||
|
|
@ -137,10 +137,12 @@ router.get('/:post_id/replies', async function (request: express.Request, respon
|
|||
}
|
||||
|
||||
const json: Record<string, any> = {
|
||||
has_error: 0,
|
||||
version: 1,
|
||||
request_name: 'replies',
|
||||
posts: []
|
||||
result: {
|
||||
has_error: 0,
|
||||
version: 1,
|
||||
request_name: 'replies',
|
||||
posts: []
|
||||
}
|
||||
};
|
||||
|
||||
for (const post of posts) {
|
||||
|
|
|
|||
|
|
@ -48,11 +48,13 @@ router.get('/', async function (request: express.Request, response: express.Resp
|
|||
|
||||
async function generateTopicsXML(communities: HydratedCommunityDocument[]): Promise<string> {
|
||||
const json: Record<string, any> = {
|
||||
has_error: 0,
|
||||
version: 1,
|
||||
expire: moment().add(1, 'days').format('YYYY-MM-DD HH:MM:SS'),
|
||||
request_name: 'topics',
|
||||
topics: []
|
||||
result: {
|
||||
has_error: 0,
|
||||
version: 1,
|
||||
expire: moment().add(1, 'days').format('YYYY-MM-DD HH:MM:SS'),
|
||||
request_name: 'topics',
|
||||
topics: []
|
||||
}
|
||||
};
|
||||
|
||||
for (const community of communities) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
export interface CryptoOptions {
|
||||
private_key: Buffer
|
||||
hmac_secret: string
|
||||
private_key: Buffer;
|
||||
hmac_secret: string;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user