Add activities page.

This commit is contained in:
2025-06-13 19:32:25 +08:00
parent 0b3b54a0c4
commit 1f238c56f3
18 changed files with 424 additions and 70 deletions

View File

@@ -17,6 +17,7 @@ import {
ServerConfig,
RSort,
TagWithCount,
Activity,
} from "./models.ts";
class Network {
@@ -994,6 +995,18 @@ class Network {
};
}
}
async getActivities(page: number = 1): Promise<PageResponse<Activity>> {
try {
const response = await axios.get(`${this.apiBaseUrl}/activity`, {
params: { page },
});
return response.data;
} catch (e: any) {
console.error(e);
return { success: false, message: e.toString() };
}
}
}
export const network = new Network();