Add endpoints #7

Merged
marihachi merged 7 commits from work/add-endpoints-1 into master 2021-05-15 05:25:18 +00:00
2 changed files with 18 additions and 1 deletions
Showing only changes of commit e0ddddc170 - Show all commits

View file

@ -1,4 +1,4 @@
import { ID, Instance, Note, OriginType, Stats, User, UserSorting } from './types';
import { ID, Instance, Note, OriginType, ServerInfo, Stats, User, UserSorting } from './types';
type TODO = Record<string, any>;
@ -75,6 +75,7 @@ export type Endpoints = {
// request-reset-password
// reset-password
'reset-password': { req: { token: string; password: string; }; res: null; };
// room
@ -82,6 +83,7 @@ export type Endpoints = {
'stats': { req: null; res: Stats; };
// server-info
'server-info': { req: null; res: ServerInfo; };
// sw

View file

@ -72,6 +72,21 @@ export type Instance = {
}[];
};
export type ServerInfo = {
machine: string;
cpu: {
model: string;
cores: number;
};
mem: {
total: number;
};
fs: {
total: number;
used: number;
};
};
export type Stats = {
notesCount: number;
originalNotesCount: number;