-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from tscenping/yubin
Yubin
- Loading branch information
Showing
15 changed files
with
149 additions
and
52 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { registerAs } from '@nestjs/config'; | ||
import { z } from 'zod'; | ||
|
||
export const FT_CONFIG = 'ft'; | ||
|
||
export default registerAs(FT_CONFIG, () => { | ||
const FT_CLIENT_ID = z.string().parse(process.env.FORTYTWO_CLIENT_ID); | ||
const FT_CLIENT_SECRET = z.string().parse(process.env.FORTYTWO_CLIENT_SECRET); | ||
const FT_REDIRECT_URI = z.string().parse(process.env.FORTYTWO_REDIRECT_URI); | ||
|
||
return { | ||
FT_CLIENT_ID, | ||
FT_CLIENT_SECRET, | ||
FT_REDIRECT_URI, | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { registerAs } from '@nestjs/config'; | ||
import type { JwtModuleOptions } from '@nestjs/jwt'; | ||
import { z } from 'zod'; | ||
|
||
export default registerAs('jwt', () => { | ||
const secret = z.string().parse(process.env.JWT_SECRET); | ||
const expiresIn = z.string().parse(process.env.JWT_EXPIRATION_TIME); | ||
|
||
return { | ||
secret, | ||
signOptions: { | ||
expiresIn, | ||
}, | ||
} satisfies JwtModuleOptions; | ||
}); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { registerAs } from '@nestjs/config'; | ||
import { z } from 'zod'; | ||
|
||
export const PGADMIN_CONFIG = 'pgadmin'; | ||
|
||
export default registerAs(PGADMIN_CONFIG, () => { | ||
const PGADMIN_DEFAULT_EMAIL = z | ||
.string() | ||
.parse(process.env.PGADMIN_DEFAULT_EMAIL); | ||
|
||
const PGADMIN_DEFAULT_PASSWORD = z | ||
.string() | ||
.parse(process.env.PGADMIN_DEFAULT_PASSWORD); | ||
|
||
return { | ||
PGADMIN_DEFAULT_EMAIL, | ||
PGADMIN_DEFAULT_PASSWORD, | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { registerAs } from '@nestjs/config'; | ||
import { z } from 'zod'; | ||
|
||
export const USER_CONFIG = 'user'; | ||
|
||
export default registerAs(USER_CONFIG, () => { | ||
const FIRST_NICKNAME_PREFIX = z | ||
.string() | ||
.parse(process.env.FIRST_NICKNAME_PREFIX); | ||
|
||
return { | ||
FIRST_NICKNAME_PREFIX, | ||
}; | ||
}); |