mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-13 08:48:57 +08:00
Minor tweaks
This commit is contained in:
parent
20ea35c9fb
commit
85ee743988
@ -148,6 +148,15 @@ function service() {
|
|||||||
const allSubs = $.read(SUBS_KEY);
|
const allSubs = $.read(SUBS_KEY);
|
||||||
const sub = allSubs[name];
|
const sub = allSubs[name];
|
||||||
if (sub) {
|
if (sub) {
|
||||||
|
try {
|
||||||
|
const output = await produceArtifact({
|
||||||
|
type: 'subscription',
|
||||||
|
item: sub,
|
||||||
|
platform,
|
||||||
|
useCache,
|
||||||
|
noProcessor: raw
|
||||||
|
});
|
||||||
|
|
||||||
// forward flow headers
|
// forward flow headers
|
||||||
if (["QX", "Surge", "Loon"].indexOf(getPlatformFromHeaders(req.headers)) !== -1) {
|
if (["QX", "Surge", "Loon"].indexOf(getPlatformFromHeaders(req.headers)) !== -1) {
|
||||||
const {headers} = await $.http.get({
|
const {headers} = await $.http.get({
|
||||||
@ -162,14 +171,6 @@ function service() {
|
|||||||
res.set("subscription-userinfo", userinfo);
|
res.set("subscription-userinfo", userinfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
|
||||||
const output = await produceArtifact({
|
|
||||||
type: 'subscription',
|
|
||||||
item: sub,
|
|
||||||
platform,
|
|
||||||
useCache,
|
|
||||||
noProcessor: raw
|
|
||||||
});
|
|
||||||
if (platform === 'JSON') {
|
if (platform === 'JSON') {
|
||||||
res.set("Content-Type", "application/json;charset=utf-8").send(output);
|
res.set("Content-Type", "application/json;charset=utf-8").send(output);
|
||||||
} else {
|
} else {
|
||||||
|
4
backend/sub-store.min.js
vendored
4
backend/sub-store.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user