Commit 6a39b514 by archer

perf: plugin response

parent a5f8fae3
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);
}
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment