import request from '@/utils/request';
import {PromptModel} from "@/api/promptwordManagement/types";
import {AxiosPromise} from "axios";

/**
 * 根据id查询prompt详细
 */

export const getPromptById=(id:number):AxiosPromise<PromptModel>=>{
return request({
    url: '/ai/prompt/category/' + id,
    method: 'get',
    // headers:myHeaders
});
};
export const addPromptCategory=(data:PromptModel)=>{
    return request({
        url:'/ai/prompt/category',
        method:'post',
        data:data
    })
}
export const putPromptCategory=(data:PromptModel)=>{
    return request({
        url:'/ai/prompt/category',
        method:'put',
        data:data
    })
}
export const deletePromptCategory=(id:number)=>{
    return request({
        url:'/ai/prompt/category/'+id,
        method:'delete',
    })
}


