fix: transform case and export client type

Signed-off-by: Innei <i@innei.in>
This commit is contained in:
Innei
2024-09-02 16:52:52 +08:00
parent da283b4730
commit f7bce0279a
5 changed files with 32 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
import type { IRequestAdapter } from '~/interfaces/adapter'
import type { IController } from '~/interfaces/controller'
import type { IRequestHandler } from '~/interfaces/request'
import type { AuthUser } from '~/models'
import type {
ActivityPresence,
LastYearPublication,
@@ -49,7 +50,10 @@ export class ActivityController<ResponseWrapper> implements IController {
* @support core >= 5.0.0
*/
getPresence(roomName: string) {
return this.proxy.presence.get<Record<string, ActivityPresence>>({
return this.proxy.presence.get<{
data: Record<string, ActivityPresence>
readers: Record<string, AuthUser>
}>({
params: {
room_name: roomName,
},