Skip to content

Commit

Permalink
Update - created axios logic to get prompt revision from backend
Browse files Browse the repository at this point in the history
  • Loading branch information
aybruhm committed Feb 14, 2024
1 parent dfcc54c commit aaa1d0d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion agenta-web/src/lib/services/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,15 @@ export const publishVariant = async (variantId: string, environmentName: string)
}

export const promptVersioning = async (variantId: string, ignoreAxiosError: boolean = false) => {
const {data} = await axios.get(`${getAgentaApiUrl()}/api/variants/${variantId}/`, {
const {data} = await axios.get(`${getAgentaApiUrl()}/api/variants/${variantId}/revisions/`, {
_ignoreError: ignoreAxiosError,
} as any)

return data
}

export const promptRevision = async (variantId: string, revisionNumber: int, ignoreAxiosError: boolean = false) => {
const {data} = await axios.get(`${getAgentaApiUrl()}/api/variants/${variantId}/revisions/${revisionNumber}/`, {
_ignoreError: ignoreAxiosError,
} as any)

Expand Down

0 comments on commit aaa1d0d

Please sign in to comment.