Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

chore: update comments (#2195)

boojack0d50f5bd08f8
diff --git a/server/server.go b/server/server.go
index a3c16f7b1..3edd4c857 100644
--- a/server/server.go
+++ b/server/server.go
@@ -85,10 +85,13 @@ func NewServer(ctx context.Context, profile *profile.Profile, store *store.Store
}
s.ID = serverID
+ // Serve frontend.
embedFrontend(e)
- // This will serve Swagger UI at /api/index.html and Swagger 2.0 spec at /api/doc.json
- e.GET("/api/*", echoSwagger.WrapHandler)
+ // Serve swagger in dev/demo mode.
+ if profile.Mode == "dev" || profile.Mode == "demo" {
+ e.GET("/api/*", echoSwagger.WrapHandler)
+ }
secret := "usememos"
if profile.Mode == "prod" {