refactor: update user collections handling to use username.

This commit is contained in:
2025-07-30 16:47:28 +08:00
parent 17b40f2214
commit a56eb559ba
3 changed files with 28 additions and 17 deletions

View File

@@ -730,10 +730,10 @@ class Network {
);
}
async listUserCollections(page: number = 1): Promise<PageResponse<Collection>> {
async listUserCollections(username: string, page: number = 1): Promise<PageResponse<Collection>> {
return this._callApi(() =>
axios.get(`${this.apiBaseUrl}/collection/list`, {
params: { page },
params: { username, page },
}),
);
}
@@ -774,11 +774,12 @@ class Network {
}
async searchUserCollections(
username: string,
keyword: string,
): Promise<Response<Collection[]>> {
return this._callApi(() =>
axios.get(`${this.apiBaseUrl}/collection/search`, {
params: { keyword },
params: { username, keyword },
}),
);
}