mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-05 07:10:29 +08:00
Refactor user REST API (#14334)
### What problem does this PR solve? Refactor user REST API ### Type of change - [x] Refactoring
This commit is contained in:
@@ -5,15 +5,15 @@ export { restAPIv1, webAPI };
|
||||
|
||||
export default {
|
||||
// user
|
||||
login: `${webAPI}/user/login`,
|
||||
logout: `${webAPI}/user/logout`,
|
||||
register: `${webAPI}/user/register`,
|
||||
setting: `${webAPI}/user/setting`,
|
||||
userInfo: `${webAPI}/user/info`,
|
||||
tenantInfo: `${webAPI}/user/tenant_info`,
|
||||
setTenantInfo: `${webAPI}/user/set_tenant_info`,
|
||||
loginChannels: `${webAPI}/user/login/channels`,
|
||||
loginChannel: (channel: string) => `${webAPI}/user/login/${channel}`,
|
||||
login: `${restAPIv1}/auth/login`,
|
||||
logout: `${restAPIv1}/auth/logout`,
|
||||
register: `${restAPIv1}/users`,
|
||||
setting: `${restAPIv1}/users/me`,
|
||||
userInfo: `${restAPIv1}/users/me`,
|
||||
tenantInfo: `${restAPIv1}/users/me/models`,
|
||||
setTenantInfo: `${restAPIv1}/users/me/models`,
|
||||
loginChannels: `${restAPIv1}/auth/login/channels`,
|
||||
loginChannel: (channel: string) => `${restAPIv1}/auth/login/${channel}`,
|
||||
|
||||
// team
|
||||
addTenantUser: (tenantId: string) => `${restAPIv1}/tenants/${tenantId}/users`,
|
||||
|
||||
@@ -78,7 +78,7 @@ const modelParamMap: ModelParamMap = {
|
||||
|
||||
// API endpoint whitelist - only these endpoints will have tenant parameters added
|
||||
const API_WHITELIST = [
|
||||
'/v1/user/set_tenant_info',
|
||||
'/api/v1/users/me/models',
|
||||
'/api/v1/chats',
|
||||
'/v1/canvas/set',
|
||||
'/v1/canvas/setting',
|
||||
|
||||
Reference in New Issue
Block a user