Skip to content
This repository has been archived by the owner on Jul 20, 2024. It is now read-only.

Commit

Permalink
feat:视频哈希值存储
Browse files Browse the repository at this point in the history
  • Loading branch information
F1yingWhite committed Jun 22, 2024
1 parent c5578f4 commit 94fe649
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
var CFG Config

type Config struct {
Dsn string `yaml:"dsn"`
PostgresqlDsn string `yaml:"postgresql_dsn"`
LogFile string `yaml:"log_file"`
JWTSigningString string `yaml:"jwt_signing_string"`
RedisDsn string `yaml:"redis_dsn"`
Expand All @@ -31,7 +31,7 @@ func ReadConfig() (*Config, error) {
}

config := &Config{
Dsn: "host=localhost user=postgres password=1234 dbname=API_BIG_WORK port=5432 sslmode=disable",
PostgresqlDsn: "host=localhost user=postgres password=1234 dbname=API_BIG_WORK port=5432 sslmode=disable",
LogFile: "log.txt",
JWTSigningString: GenerateRandomString(32),
RedisDsn: "localhost:6379",
Expand Down
2 changes: 1 addition & 1 deletion models/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func InitDB(cfg *config.Config) {
var db *gorm.DB
var err error
if config.Postgresql {
db, err = postgresDB(cfg.Dsn, &gorm.Config{})
db, err = postgresDB(cfg.PostgresqlDsn, &gorm.Config{})
} else {
db, err = sqliteDB(&gorm.Config{})
}
Expand Down

0 comments on commit 94fe649

Please sign in to comment.