mirror of
https://github.com/p-stream/backend.git
synced 2026-03-11 17:55:35 +00:00
fixed type and trying to debug issue
This commit is contained in:
parent
fe25b07d4f
commit
05bbc4720d
2 changed files with 19 additions and 15 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { config } from 'dotenv';
|
||||
import { config } from "dotenv";
|
||||
config();
|
||||
import { version } from "./server/utils/config";
|
||||
//https://nitro.unjs.io/config
|
||||
|
|
@ -11,18 +11,18 @@ export default defineNitroConfig({
|
|||
runtimeConfig: {
|
||||
public: {
|
||||
meta: {
|
||||
name: process.env.META_NAME || '',
|
||||
description: process.env.META_DESCRIPTION || '',
|
||||
version: version || '',
|
||||
captcha: (process.env.CAPTCHA === 'true').toString(),
|
||||
captchaClientKey: process.env.CAPTCHA_CLIENT_KEY || ''
|
||||
}
|
||||
name: process.env.META_NAME || "",
|
||||
description: process.env.META_DESCRIPTION || "",
|
||||
version: version || "",
|
||||
captcha: (process.env.CAPTCHA === "true").toString(),
|
||||
captchaClientKey: process.env.CAPTCHA_CLIENT_KEY || "",
|
||||
},
|
||||
},
|
||||
cryptoSecret: process.env.CRYPTO_SECRET,
|
||||
tmdbApiKey: process.env.TMDB_API_KEY,
|
||||
trakt: {
|
||||
clientId: process.env.TRAKT_CLIENT_ID,
|
||||
clinetSecret: process.env.TRAKT_CLIENT_SECRET,
|
||||
clientSecret: process.env.TRAKT_CLIENT_SECRET,
|
||||
},
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,10 +1,14 @@
|
|||
import Trakt from 'trakt.tv';
|
||||
const traktKeys = useRuntimeConfig().trakt
|
||||
import Trakt from "trakt.tv";
|
||||
const traktKeys = useRuntimeConfig().trakt;
|
||||
|
||||
if (!traktKeys) {
|
||||
throw new Error("Missing TraktKeys info ERROR: " + JSON.stringify(traktKeys));
|
||||
}
|
||||
|
||||
const options = {
|
||||
client_id: traktKeys.clientId,
|
||||
client_secret: traktKeys.clinetSecret
|
||||
}
|
||||
client_secret: traktKeys.clientSecret,
|
||||
};
|
||||
|
||||
const trakt = new Trakt(options);
|
||||
export default trakt;
|
||||
export default trakt;
|
||||
|
|
|
|||
Loading…
Reference in a new issue