mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-24 22:03:54 +00:00
perf: plugin response
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
import { GET, POST } from './request';
|
import { GET, POST } from './request';
|
||||||
|
|
||||||
export const textCensor = (data: { text: string }) => POST('/plugins/censor/text_baidu', data);
|
export const textCensor = (data: { text: string }) =>
|
||||||
|
POST<{ code?: number; message: string }>('/plugins/censor/text_baidu', data).then((res) => {
|
||||||
|
if (res?.code === 5000) {
|
||||||
|
return Promise.reject(res.message);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Reference in New Issue
Block a user