refactor(base): drop /list suffix from base endpoints to match codebase convention

This commit is contained in:
Philipinho
2026-04-18 23:36:52 +01:00
parent 83d28a8505
commit 95d0457a7e
4 changed files with 6 additions and 6 deletions
@@ -71,7 +71,7 @@ export async function listBases(
spaceId: string, spaceId: string,
params?: { cursor?: string; limit?: number }, params?: { cursor?: string; limit?: number },
): Promise<IPagination<IBase>> { ): Promise<IPagination<IBase>> {
const req = await api.post("/bases/list", { spaceId, ...params }); const req = await api.post("/bases", { spaceId, ...params });
return req.data; return req.data;
} }
@@ -143,7 +143,7 @@ export async function listRows(
search?: SearchSpec; search?: SearchSpec;
}, },
): Promise<IPagination<IBaseRow>> { ): Promise<IPagination<IBaseRow>> {
const req = await api.post("/bases/rows/list", { baseId, ...params }); const req = await api.post("/bases/rows", { baseId, ...params });
return req.data; return req.data;
} }
@@ -168,6 +168,6 @@ export async function deleteView(data: DeleteViewInput): Promise<void> {
} }
export async function listViews(baseId: string): Promise<IBaseView[]> { export async function listViews(baseId: string): Promise<IBaseView[]> {
const req = await api.post<IBaseView[]>("/bases/views/list", { baseId }); const req = await api.post<IBaseView[]>("/bases/views", { baseId });
return req.data; return req.data;
} }
@@ -140,7 +140,7 @@ export class BaseRowController {
} }
@HttpCode(HttpStatus.OK) @HttpCode(HttpStatus.OK)
@Post('list') @Post()
async list( async list(
@Body() dto: ListRowsDto, @Body() dto: ListRowsDto,
@Body() pagination: PaginationOptions, @Body() pagination: PaginationOptions,
@@ -93,7 +93,7 @@ export class BaseViewController {
} }
@HttpCode(HttpStatus.OK) @HttpCode(HttpStatus.OK)
@Post('list') @Post()
async list( async list(
@Body() dto: BaseIdDto, @Body() dto: BaseIdDto,
@AuthUser() user: User, @AuthUser() user: User,
@@ -100,7 +100,7 @@ export class BaseController {
} }
@HttpCode(HttpStatus.OK) @HttpCode(HttpStatus.OK)
@Post('list') @Post()
async list( async list(
@Body() dto: SpaceIdDto, @Body() dto: SpaceIdDto,
@Body() pagination: PaginationOptions, @Body() pagination: PaginationOptions,