Skip to content

Commit 82c5acc

Browse files
feat: update features API endpoints to v2 (#511)
1 parent d433106 commit 82c5acc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/api/features.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export const updateFeatureStatus = async (
107107
params: UpdateFeatureStatusParams,
108108
): Promise<Feature> => {
109109
const response = await axiosClient.patch(
110-
`/v1/projects/${project_id}/features/${feature_id}/status`,
110+
`/v2/projects/${project_id}/features/${feature_id}/status`,
111111
params,
112112
{
113113
headers: buildHeaders(token),
@@ -187,7 +187,7 @@ const generatePaginatedFeatureUrl = (
187187
perPage: number,
188188
status: string,
189189
): string => {
190-
return `/v1/projects/${project_id}/features?perPage=${perPage}&page=${page}&status=${status}`
190+
return `/v2/projects/${project_id}/features?perPage=${perPage}&page=${page}&status=${status}`
191191
}
192192

193193
export const getFeatureAuditLogHistory = async (

src/commands/generate/types.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,11 @@ const setupNockMock = (customProperties: unknown[]) => (api: Nock.Scope) => {
169169
mockOrganizationMembersResponseHeaders,
170170
)
171171
.get(
172-
'/v1/projects/project/features?perPage=1000&page=1&status=complete',
172+
'/v2/projects/project/features?perPage=1000&page=1&status=complete',
173173
)
174174
.reply(200, mockCompletedArchivedFeaturesResponse)
175175
.get(
176-
'/v1/projects/project/features?perPage=1000&page=1&status=archived',
176+
'/v2/projects/project/features?perPage=1000&page=1&status=archived',
177177
)
178178
.reply(200, mockCompletedArchivedFeaturesResponse)
179179
.get('/v1/projects/project/customProperties')

0 commit comments

Comments
 (0)