File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ async getConfig() {
4343}
4444```
4545
46- - 路径:` GET /api/v1/system/config `
46+ - 路径:` GET /api/v1/system/open/ config `
4747- 权限:公开接口,无需认证
4848- 返回:` { allowRegistration: boolean } `
4949
@@ -82,7 +82,7 @@ OPERATION_NOT_ALLOWED: 6, // 操作不被允许
8282``` typescript
8383export const getSystemConfig = () => {
8484 return request .get <unknown , { code: number ; msg: string ; data: { allowRegistration: boolean } }>(
85- ' /api/v1/system/config'
85+ ' /api/v1/system/open/ config'
8686 );
8787};
8888```
@@ -207,7 +207,7 @@ pnpm dev
207207
208208``` bash
209209# 1. 获取系统配置
210- curl http://localhost:3000/api/v1/system/config
210+ curl http://localhost:3000/api/v1/system/open/ config
211211
212212# 预期响应(允许注册):
213213# {
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import type { UserInfoDto } from '@aimo/dto';
1414export class SystemController {
1515 constructor ( private gitHubReleaseService : GitHubReleaseService ) { }
1616
17- @Get ( '/version' )
17+ @Get ( '/open/ version' )
1818 async getVersion ( @CurrentUser ( ) user : UserInfoDto ) {
1919 // 需要登录后才能访问,返回服务端版本号
2020 const packageJson = await import ( '../../../package.json' , { with : { type : 'json' } } ) ;
@@ -27,7 +27,7 @@ export class SystemController {
2727 * Get latest app versions from GitHub releases
2828 * Public endpoint - no authentication required
2929 */
30- @Get ( '/app-versions' )
30+ @Get ( '/open/ app-versions' )
3131 async getAppVersions ( ) {
3232 try {
3333 const versions = await this . gitHubReleaseService . getAllVersions ( ) ;
@@ -45,7 +45,7 @@ export class SystemController {
4545 * Get public system configuration
4646 * Public endpoint - no authentication required
4747 */
48- @Get ( '/config' )
48+ @Get ( '/open/ config' )
4949 async getConfig ( ) {
5050 return ResponseUtility . success ( {
5151 allowRegistration : config . auth . allowRegistration ,
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ const AUTH_EXCLUDED_PATHS = [
1919 '/api/v1/memos/ba' ,
2020 '/api/v1/attachments/ba' ,
2121 '/api/v1/debug/ba' ,
22+ '/api/v1/system/open' ,
2223] ;
2324
2425/**
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import request from '../utils/request';
66 */
77export const getVersion = ( ) => {
88 return request . get < unknown , { code : number ; msg : string ; data : { version : string } } > (
9- '/api/v1/system/version'
9+ '/api/v1/system/open/ version'
1010 ) ;
1111} ;
1212
@@ -16,7 +16,7 @@ export const getVersion = () => {
1616 */
1717export const getAppVersions = ( ) => {
1818 return request . get < unknown , { code : number ; msg : string ; data : AllVersionsResponseDto } > (
19- '/api/v1/system/app-versions'
19+ '/api/v1/system/open/ app-versions'
2020 ) ;
2121} ;
2222
@@ -26,6 +26,6 @@ export const getAppVersions = () => {
2626 */
2727export const getSystemConfig = ( ) => {
2828 return request . get < unknown , { code : number ; msg : string ; data : { allowRegistration : boolean } } > (
29- '/api/v1/system/config'
29+ '/api/v1/system/open/ config'
3030 ) ;
3131} ;
You can’t perform that action at this time.
0 commit comments