mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-28 17:18:35 +00:00
purge old permission (#2118)
* chore: purge old permission - remove useless role of teamMember - Cleanup auth apis' Props and Return type Definitions * chore: a better way of RequireAtLeastOne Signed-off-by: Finley Ge <m13203533462@163.com> --------- Signed-off-by: Finley Ge <m13203533462@163.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { parseHeaderCert } from '../controller';
|
||||
import { AuthModeType } from '../type';
|
||||
import { SERVICE_LOCAL_HOST } from '../../../common/system/tools';
|
||||
import { ApiRequestProps } from '../../../type/next';
|
||||
|
||||
export const authCert = async (props: AuthModeType) => {
|
||||
const result = await parseHeaderCert(props);
|
||||
@@ -13,7 +14,7 @@ export const authCert = async (props: AuthModeType) => {
|
||||
};
|
||||
|
||||
/* auth the request from local service */
|
||||
export const authRequestFromLocal = ({ req }: AuthModeType) => {
|
||||
export const authRequestFromLocal = ({ req }: { req: ApiRequestProps }) => {
|
||||
if (req.headers.host !== SERVICE_LOCAL_HOST) {
|
||||
return Promise.reject('Invalid request');
|
||||
}
|
||||
|
Reference in New Issue
Block a user