mirror of
https://github.com/apricote/Listory.git
synced 2026-01-13 21:21:02 +00:00
feat(api): validate configuration
This commit is contained in:
parent
ad98ce4e88
commit
e78c6e312d
8 changed files with 109 additions and 12 deletions
|
|
@ -1,13 +1,15 @@
|
|||
import { HttpModule, Module } from "@nestjs/common";
|
||||
import { ConfigService } from "@nestjs/config";
|
||||
import { SpotifyAuthService } from "./spotify-auth.service";
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
HttpModule.registerAsync({
|
||||
useFactory: () => ({
|
||||
useFactory: (config: ConfigService) => ({
|
||||
timeout: 5000,
|
||||
baseURL: "https://accounts.spotify.com/",
|
||||
baseURL: config.get<string>("SPOTIFY_AUTH_API_URL"),
|
||||
}),
|
||||
inject: [ConfigService],
|
||||
}),
|
||||
],
|
||||
providers: [SpotifyAuthService],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue