mirror of
https://github.com/PretendoNetwork/miiverse-api.git
synced 2026-04-26 00:27:20 -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> = {
|
const json: Record<string, any> = {
|
||||||
has_error: 0,
|
result: {
|
||||||
version: 1,
|
has_error: 0,
|
||||||
request_name: 'posts',
|
version: 1,
|
||||||
topic: {
|
request_name: 'posts',
|
||||||
community_id: community.community_id
|
topic: {
|
||||||
},
|
community_id: community.community_id
|
||||||
posts: []
|
},
|
||||||
|
posts: []
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const post of 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> = {
|
const json: Record<string, any> = {
|
||||||
has_error: 0,
|
result: {
|
||||||
version: 1,
|
has_error: 0,
|
||||||
expire: moment().add(1, 'days').format('YYYY-MM-DD HH:MM:SS'),
|
version: 1,
|
||||||
request_name: 'posts',
|
expire: moment().add(1, 'days').format('YYYY-MM-DD HH:MM:SS'),
|
||||||
people: []
|
request_name: 'posts',
|
||||||
|
people: []
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const post of posts) {
|
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> = {
|
const json: Record<string, any> = {
|
||||||
has_error: 0,
|
result: {
|
||||||
version: 1,
|
has_error: 0,
|
||||||
request_name: 'replies',
|
version: 1,
|
||||||
posts: []
|
request_name: 'replies',
|
||||||
|
posts: []
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const post of 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> {
|
async function generateTopicsXML(communities: HydratedCommunityDocument[]): Promise<string> {
|
||||||
const json: Record<string, any> = {
|
const json: Record<string, any> = {
|
||||||
has_error: 0,
|
result: {
|
||||||
version: 1,
|
has_error: 0,
|
||||||
expire: moment().add(1, 'days').format('YYYY-MM-DD HH:MM:SS'),
|
version: 1,
|
||||||
request_name: 'topics',
|
expire: moment().add(1, 'days').format('YYYY-MM-DD HH:MM:SS'),
|
||||||
topics: []
|
request_name: 'topics',
|
||||||
|
topics: []
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const community of communities) {
|
for (const community of communities) {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
export interface CryptoOptions {
|
export interface CryptoOptions {
|
||||||
private_key: Buffer
|
private_key: Buffer;
|
||||||
hmac_secret: string
|
hmac_secret: string;
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user