mirror of https://github.com/usememos/memos.git
Frontend was incorrectly using numeric enum values (e.g., 1, 2, 3) instead of string names (e.g., "GENERAL", "STORAGE") when constructing API resource paths. This caused the backend to fail with "unsupported instance setting key: INSTANCE_SETTING_KEY_UNSPECIFIED" errors during initialization. Changes: - Add helper functions in store/common.ts to convert enum values to names - getInstanceSettingKeyName() and buildInstanceSettingName() - getUserSettingKeyName() and buildUserSettingName() - Update instance store to use string enum names in API calls - Update user store to use string enum names in API calls - Update all components to use new helper functions for setting names Fixes enum string conversion for: - InstanceSetting_Key (6 locations) - UserSetting_Key (2 locations) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| .gitignore | ||
| biome.json | ||
| components.json | ||
| index.html | ||
| package.json | ||
| pnpm-lock.yaml | ||
| tsconfig.json | ||
| vite.config.mts | ||