mirror of
https://github.com/p-stream/backend.git
synced 2026-04-21 03:42:24 +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();
|
config();
|
||||||
import { version } from "./server/utils/config";
|
import { version } from "./server/utils/config";
|
||||||
//https://nitro.unjs.io/config
|
//https://nitro.unjs.io/config
|
||||||
|
|
@ -11,18 +11,18 @@ export default defineNitroConfig({
|
||||||
runtimeConfig: {
|
runtimeConfig: {
|
||||||
public: {
|
public: {
|
||||||
meta: {
|
meta: {
|
||||||
name: process.env.META_NAME || '',
|
name: process.env.META_NAME || "",
|
||||||
description: process.env.META_DESCRIPTION || '',
|
description: process.env.META_DESCRIPTION || "",
|
||||||
version: version || '',
|
version: version || "",
|
||||||
captcha: (process.env.CAPTCHA === 'true').toString(),
|
captcha: (process.env.CAPTCHA === "true").toString(),
|
||||||
captchaClientKey: process.env.CAPTCHA_CLIENT_KEY || ''
|
captchaClientKey: process.env.CAPTCHA_CLIENT_KEY || "",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
cryptoSecret: process.env.CRYPTO_SECRET,
|
cryptoSecret: process.env.CRYPTO_SECRET,
|
||||||
tmdbApiKey: process.env.TMDB_API_KEY,
|
tmdbApiKey: process.env.TMDB_API_KEY,
|
||||||
trakt: {
|
trakt: {
|
||||||
clientId: process.env.TRAKT_CLIENT_ID,
|
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';
|
import Trakt from "trakt.tv";
|
||||||
const traktKeys = useRuntimeConfig().trakt
|
const traktKeys = useRuntimeConfig().trakt;
|
||||||
|
|
||||||
|
if (!traktKeys) {
|
||||||
|
throw new Error("Missing TraktKeys info ERROR: " + JSON.stringify(traktKeys));
|
||||||
|
}
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
client_id: traktKeys.clientId,
|
client_id: traktKeys.clientId,
|
||||||
client_secret: traktKeys.clinetSecret
|
client_secret: traktKeys.clientSecret,
|
||||||
}
|
};
|
||||||
|
|
||||||
const trakt = new Trakt(options);
|
const trakt = new Trakt(options);
|
||||||
export default trakt;
|
export default trakt;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue