Add view paste detail support (web)

Add json response on settings (paste)

Signed-off-by: Joe Ma <rikkaneko23@gmail.com>
This commit is contained in:
Joe Ma 2023-03-27 01:01:50 +08:00
parent 0f89088486
commit 32b4da79a6
No known key found for this signature in database
GPG key ID: 7A0ECF5F5EDC587F
3 changed files with 33 additions and 10 deletions

View file

@ -278,7 +278,8 @@ export default {
switch (method) {
case 'GET': {
const need_qrcode = searchParams.get('qr') === '1' || headers.get('x-qr') === '1';
return await get_paste_info(uuid, descriptor, env, is_browser, need_qrcode);
const reply_json = searchParams.get('json') === '1' || headers.get('x-json') === '1';
return await get_paste_info(uuid, descriptor, env, is_browser, need_qrcode, reply_json);
}
case 'POST': {