mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-08-15 12:05:19 +08:00
Basic user stats in the accounts page (#1158)
Closes #747 Blocked by #1156 #1166 Very simplistic, not much styling
This commit is contained in:
@@ -307,4 +307,9 @@ export class OasstApiClient {
|
||||
const backendUser = await this.post<BackendUser>(`/api/v1/frontend_users/`, user);
|
||||
await this.put<void>(`/api/v1/users/${backendUser.user_id}?tos_acceptance=true`);
|
||||
}
|
||||
|
||||
async fetch_user_stats(user: BackendUserCore) {
|
||||
const backendUser = await this.get<BackendUser>(`/api/v1/frontend_users/${user.auth_method}/${user.id}`);
|
||||
return this.get(`/api/v1/users/${backendUser.user_id}/stats`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user