1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2026-06-03 16:35:37 +02:00

Refactor so storage detects if Insert fails because of unique constraint (#6259)

This commit is contained in:
6543
2026-03-19 13:17:56 +01:00
committed by GitHub
parent e94ceca123
commit 2bc56896f3
49 changed files with 120 additions and 164 deletions
+1 -1
View File
@@ -137,7 +137,7 @@ const jwtSecretID = "jwt-secret"
func setupJWTSecret(_store store.Store) (string, error) {
jwtSecret, err := _store.ServerConfigGet(jwtSecretID)
if errors.Is(err, types.RecordNotExist) {
if errors.Is(err, types.ErrRecordNotExist) {
jwtSecret := base32.StdEncoding.EncodeToString(
random.GetRandomBytes(32),
)