mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2025-03-04 07:18:50 -07:00
add info
This commit is contained in:
parent
da322a086b
commit
41c7dfe208
1 changed files with 3 additions and 2 deletions
|
@ -39,6 +39,7 @@ export async function importPosts(
|
|||
try {
|
||||
const parsed = JSON.parse(json);
|
||||
if (parsed instanceof Array) {
|
||||
logger.info("Parsing key style posts");
|
||||
for (const post of JSON.parse(json)) {
|
||||
try {
|
||||
linenum++;
|
||||
|
@ -78,7 +79,8 @@ export async function importPosts(
|
|||
logger.warn(`Error in line:${linenum} ${e}`);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else if (parsed instanceof Object) {
|
||||
logger.info("Parsing animal style posts");
|
||||
for (const post of parsed.orderedItems) {
|
||||
try {
|
||||
linenum++;
|
||||
|
@ -112,7 +114,6 @@ export async function importPosts(
|
|||
} catch (e) {
|
||||
logger.warn(`Error in line:${linenum} ${e}`);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
|
|
Loading…
Add table
Reference in a new issue