More refining

This commit is contained in:
binwiederhier
2026-03-14 08:42:07 -04:00
parent 3402510b47
commit 143935b917
4 changed files with 221 additions and 76 deletions
+3 -1
View File
@@ -282,7 +282,9 @@ func execServe(c *cli.Context) error {
}
// Check values
if databaseURL != "" && (authFile != "" || cacheFile != "" || webPushFile != "") {
if databaseURL != "" && !strings.HasPrefix(databaseURL, "postgres://") {
return errors.New("if database-url is set, it must start with postgres://")
} else if databaseURL != "" && (authFile != "" || cacheFile != "" || webPushFile != "") {
return errors.New("if database-url is set, auth-file, cache-file, and web-push-file must not be set")
} else if firebaseKeyFile != "" && !util.FileExists(firebaseKeyFile) {
return errors.New("if set, FCM key file must exist")