show dest & srchost
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import router from "../router";
|
||||
import sql from "../sql";
|
||||
import { parse } from "url";
|
||||
import cfg from "../../../config.json";
|
||||
|
||||
import { mimes, queries } from "./inc/api";
|
||||
@@ -77,6 +78,7 @@ router.get(/^\/api\/item\/[0-9]+$/, async (req, res) => {
|
||||
const data = rows[0].length > 0 ? {
|
||||
...rows[0][0], ...{
|
||||
thumb: `${cfg.main.url}/t/${rows[0][0].id}.png`,
|
||||
srchost: parse(rows[0][0].src).hostname,
|
||||
next: rows[1].length ? rows[1][0].id : null,
|
||||
prev: rows[2].length ? rows[2][0].id : null,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user