Add tagged resources page.

This commit is contained in:
2025-05-13 17:47:15 +08:00
parent 0dd2143664
commit f1345f9a0c
8 changed files with 88 additions and 8 deletions

View File

@@ -308,6 +308,23 @@ class Network {
}
}
async getResourcesByTag(tag: string, page: number): Promise<PageResponse<Resource>> {
try {
const response = await axios.get(`${this.apiBaseUrl}/resource/tag/${tag}`, {
params: {
page
}
})
return response.data
} catch (e: any) {
console.error(e)
return {
success: false,
message: e.toString(),
}
}
}
async searchResources(keyword: string, page: number): Promise<PageResponse<Resource>> {
try {
const response = await axios.get(`${this.apiBaseUrl}/resource/search`, {