Skip to content

Commit

Permalink
feat: Add optional custom domain functionality (#609)
Browse files Browse the repository at this point in the history
* feat(gogoanime,zoro): Add optional custom domain functionality

* refactor(gogoanime,zoro): make code for optional custom domain functionality much cleaner
  • Loading branch information
hase0278 authored May 16, 2024
1 parent 31ad982 commit cb37014
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ REDIS_PORT=Redis port (optional)
REDIS_PASSWORD=Redis password (optional)
NINE_ANIME_HELPER_URL=9anime (optional)
TMDB_KEY=TMDB access token auth (optional)
RECAPTCHATOKEN=Gogoanime recaptcha token (optional)
GOGOANIME_URL=Gogoanime custom url (optional)
ZORO_URL=Zoro custom url (optional)
NODE_ENV=Environment (optional) (DEMO or PROD)
2 changes: 1 addition & 1 deletion src/routes/anime/gogoanime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { redis } from '../../main';
import { Redis } from 'ioredis';

const routes = async (fastify: FastifyInstance, options: RegisterOptions) => {
const gogoanime = new ANIME.Gogoanime();
const gogoanime = new ANIME.Gogoanime(process.env.GOGOANIME_URL);
const redisCacheTime = 60 * 60;
const redisPrefix = 'gogoanime:';

Expand Down
2 changes: 1 addition & 1 deletion src/routes/anime/zoro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ANIME } from '@consumet/extensions';
import { StreamingServers } from '@consumet/extensions/dist/models';

const routes = async (fastify: FastifyInstance, options: RegisterOptions) => {
const zoro = new ANIME.Zoro();
const zoro = new ANIME.Zoro(process.env.ZORO_URL);

fastify.get('/', (_, rp) => {
rp.status(200).send({
Expand Down

0 comments on commit cb37014

Please sign in to comment.