Skip to content

Commit

Permalink
Merge pull request #6 from isd-sgcu/remove-max-size
Browse files Browse the repository at this point in the history
remove APP_MAX_FILE_SIZE_MB
  • Loading branch information
bookpanda authored Jul 13, 2024
2 parents f1964bd + d053f97 commit f494b06
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
1 change: 0 additions & 1 deletion .env.template
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
APP_PORT=3005
APP_ENV=development
APP_MAX_FILE_SIZE_MB=

STORE_ENDPOINT=
STORE_ACCESS_KEY=
Expand Down
15 changes: 4 additions & 11 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ package config

import (
"os"
"strconv"

"github.com/joho/godotenv"
)

type App struct {
Port string
Env string
MaxFileSize int64
Port string
Env string
}

type DB struct {
Expand Down Expand Up @@ -40,14 +38,9 @@ func LoadConfig() (config *Config, err error) {
}
}

maxFileSizeMB, err := strconv.ParseInt(os.Getenv("APP_MAX_FILE_SIZE_MB"), 10, 64)
if err != nil {
return nil, err
}
appConfig := App{
Port: os.Getenv("APP_PORT"),
Env: os.Getenv("APP_ENV"),
MaxFileSize: maxFileSizeMB,
Port: os.Getenv("APP_PORT"),
Env: os.Getenv("APP_ENV"),
}

storeConfig := Store{
Expand Down

0 comments on commit f494b06

Please sign in to comment.