@@ -3,6 +3,7 @@ import type { IController } from '~/interfaces/controller'
|
||||
import type { IRequestHandler } from '~/interfaces/request'
|
||||
import type {
|
||||
ActivityPresence,
|
||||
LastYearPublication,
|
||||
RecentActivities,
|
||||
RoomsData,
|
||||
} from '~/models/activity'
|
||||
@@ -95,4 +96,8 @@ export class ActivityController<ResponseWrapper> implements IController {
|
||||
async getRecentActivities() {
|
||||
return this.proxy.recent.get<RecentActivities>()
|
||||
}
|
||||
|
||||
async getLastYearPublication(): Promise<LastYearPublication> {
|
||||
return this.proxy(`last-year`).publication.get<LastYearPublication>()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,3 +100,33 @@ export interface RecentRecent {
|
||||
down: number
|
||||
created: string
|
||||
}
|
||||
|
||||
export interface LastYearPublication {
|
||||
posts: PostsItem[]
|
||||
notes: NotesItem[]
|
||||
}
|
||||
|
||||
interface PostsItem {
|
||||
id: string
|
||||
created: string
|
||||
title: string
|
||||
slug: string
|
||||
categoryId: string
|
||||
category: Category
|
||||
}
|
||||
interface Category {
|
||||
id: string
|
||||
type: number
|
||||
name: string
|
||||
slug: string
|
||||
created: string
|
||||
}
|
||||
interface NotesItem {
|
||||
id: string
|
||||
created: string
|
||||
title: string
|
||||
mood: string
|
||||
weather: string
|
||||
nid: number
|
||||
bookmark: boolean
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user