Skip to content

Commit 4a029dc

Browse files
committed
separate env
1 parent 763b5e1 commit 4a029dc

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

docker-entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
set -e
88

9-
export GITHUB_CLIRNT_ID=$(aws ssm get-parameters --name /ghlinkcard/github/clientid --query "Parameters[0].Value" --region ap-northeast-1 --output text)
10-
export GITHUB_SECRETGITHUB_SECRET=$(aws ssm get-parameters --name /ghlinkcard/github/clientsecret --with-decryption --query "Parameters[0].Value" --region ap-northeast-1 --output text)
9+
export GITHUB_CLIENT_ID=$(aws ssm get-parameters --name /ghlinkcard/github/clientid --query "Parameters[0].Value" --region ap-northeast-1 --output text)
10+
export GITHUB_SECRET=$(aws ssm get-parameters --name /ghlinkcard/github/clientsecret --with-decryption --query "Parameters[0].Value" --region ap-northeast-1 --output text)
1111

1212
exec "$@"

infrastructure/router.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func (r *Router) InitRouter() *gin.Engine {
2929
router.GET("/api/v1/images/:user/:repo", r.Handler.GetCode)
3030
router.GET("/api/v1/fdceda", func(c *gin.Context) {
3131
c.JSON(http.StatusOK, gin.H{
32-
"val": os.Getenv("GITHUB_CLIRNT_ID"),
32+
"val": os.Getenv("GITHUB_CLIENT_ID"),
3333
})
3434
})
3535
return router

lib/env/env.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ func init() {
3838
}
3939
Port = port
4040

41-
githubClientID := os.Getenv("GITHUB_CLIRNT_ID")
41+
githubClientID := os.Getenv("GITHUB_CLIENT_ID")
4242
if githubClientID == "" {
43-
l.Warnf("GITHUB_CLIRNT_ID environment is not exists.")
43+
l.Warnf("GITHUB_CLIENT_ID environment is not exists.")
4444
}
4545
GithubClientID = githubClientID
4646

0 commit comments

Comments
 (0)