You've already forked woodpecker
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:
+1
-1
@@ -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),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user