π The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.
Vue dockergolangkanbanknowledge-baseknowledge-managementmarkdownnote-takingnotesnotes-appnotionnuxtnuxtjsoffline-firstoidcpwaselfhostedssovuevuejswiki
Fix sql reserved keyword
Smaug#6739acea2d8d474a
diff --git a/backend/router/router.go b/backend/router/router.goindex 582252f7..f7637b87 100644--- a/backend/router/router.go+++ b/backend/router/router.go@@ -14,5 +14,6 @@ func InitRouter(app *app.App) *gin.Engine {routes.Auth(app, mainGroup)routes.Uploads(app, mainGroup)routes.Documents(app, mainGroup)+ routes.Categories(app, mainGroup)return router}diff --git a/backend/services/category.service.go b/backend/services/category.service.goindex fe0617aa..348f46c9 100644--- a/backend/services/category.service.go+++ b/backend/services/category.service.go@@ -15,7 +15,7 @@ func NewCategoryService(db *sql.DB) CategoryService {func (s *Service) GetAllCategories(userId int64) ([]*models.Category, error) {var categories []*models.Category- rows, err := s.db.Query("SELECT * FROM categories WHERE author_id = ? ORDER BY order", userId)+ rows, err := s.db.Query("SELECT * FROM categories WHERE author_id = ? ORDER BY `order`", userId)if err != nil {return nil, err}