@@ -214,7 +214,7 @@ const fetchConversation = async (id: string): Promise<Conversation> => {
214214
215215const newConversation = async ( ) : Promise < Conversation > => {
216216 try {
217- const response = await publicApi . post ( `/chatgpt/conversations/` , {
217+ const response = await adminApi . post ( `/chatgpt/conversations/` , {
218218 messages : [ ] ,
219219 } ) ;
220220 return response . data ;
@@ -230,7 +230,7 @@ const continueConversation = async (
230230 page_context ?: string ,
231231) : Promise < { response : string ; title : Conversation [ "title" ] } > => {
232232 try {
233- const response = await publicApi . post (
233+ const response = await adminApi . post (
234234 `/chatgpt/conversations/${ id } /continue_conversation/` ,
235235 {
236236 message,
@@ -246,7 +246,7 @@ const continueConversation = async (
246246
247247const deleteConversation = async ( id : string ) => {
248248 try {
249- const response = await publicApi . delete ( `/chatgpt/conversations/${ id } /` ) ;
249+ const response = await adminApi . delete ( `/chatgpt/conversations/${ id } /` ) ;
250250 return response . data ;
251251 } catch ( error ) {
252252 console . error ( "Error(s) during deleteConversation: " , error ) ;
@@ -259,7 +259,7 @@ const updateConversationTitle = async (
259259 newTitle : Conversation [ "title" ] ,
260260) : Promise < { status : string , title : Conversation [ "title" ] } | { error : string } > => {
261261 try {
262- const response = await publicApi . patch ( `/chatgpt/conversations/${ id } /update_title/` , {
262+ const response = await adminApi . patch ( `/chatgpt/conversations/${ id } /update_title/` , {
263263 title : newTitle ,
264264 } ) ;
265265 return response . data ;
0 commit comments