Add backups, currencies and dashboard APIs, and scope access by guard_name.
Some checks failed
CI/CD / Vet, test, build (push) Has been cancelled
CI/CD / Docker image (push) Has been cancelled
CI/CD / Deploy binary to server (push) Has been cancelled

Web users may only CRUD their own records, operators stay in assigned branches, and admin/manager/superadmin keep full access.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-31 18:14:47 +05:00
parent 0d000f9af6
commit 28509eb4ca
65 changed files with 9132 additions and 296 deletions

View File

@@ -37,7 +37,7 @@ func NewClient(ctx context.Context, maxAttempts int, sc config.StorageConfig) (*
cfg.MaxConns = int32(sc.PgPoolMaxConn)
cfg.HealthCheckPeriod = 2 * time.Second
cfg.MaxConnLifetime = 24 * time.Hour
cfg.MaxConnIdleTime = 2 * time.Second
cfg.MaxConnIdleTime = 30 * time.Minute
cfg.ConnConfig.ConnectTimeout = 1 * time.Second
cfg.ConnConfig.DialFunc = (&net.Dialer{

View File

@@ -35,7 +35,7 @@ func generateTokenPair(id int, admin bool) (map[string]string, error) {
accessToken := jwt.NewWithClaims(jwt.SigningMethodHS256, jwt.MapClaims{
"id": id,
"admin": admin,
"exp": time.Now().Add(time.Hour).Unix(),
"exp": time.Now().Add(7*24*time.Hour).Unix(),
})
access, err := accessToken.SignedString(secret)