stuff
This commit is contained in:
parent
14f8e77e6a
commit
a2f001392b
11 changed files with 241 additions and 2 deletions
|
@ -14,8 +14,13 @@ public class MetaController(DatabaseContext db) : ApiControllerBase
|
|||
var userCount = await db.Users.CountAsync();
|
||||
var memberCount = await db.Members.CountAsync();
|
||||
|
||||
return Ok(new MetaResponse(userCount, memberCount, BuildInfo.Version, BuildInfo.Hash));
|
||||
return Ok(new MetaResponse(
|
||||
BuildInfo.Version, BuildInfo.Hash, memberCount,
|
||||
new UserInfo(userCount, 0, 0, 0))
|
||||
);
|
||||
}
|
||||
|
||||
private record MetaResponse(int Users, int Members, string Version, string Hash);
|
||||
private record MetaResponse(string Version, string Hash, int Members, UserInfo Users);
|
||||
|
||||
private record UserInfo(int Total, int ActiveMonth, int ActiveWeek, int ActiveDay);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue