mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
feat(server): add compatibility field (#4022)
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import { Controller, Get } from '@nestjs/common';
|
||||
|
||||
import pkg from '../package.json' assert { type: 'json' };
|
||||
|
||||
@Controller('/')
|
||||
export class AppController {
|
||||
@Get()
|
||||
hello() {
|
||||
info() {
|
||||
const version = AFFiNE.version;
|
||||
return {
|
||||
message: `AFFiNE GraphQL server: ${pkg.version}`,
|
||||
compatibility: version,
|
||||
message: `AFFiNE ${version} Server`,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { INestApplication, LoggerService } from '@nestjs/common';
|
||||
import type { INestApplication } from '@nestjs/common';
|
||||
import { Test } from '@nestjs/testing';
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
// @ts-expect-error graphql-upload is not typed
|
||||
@@ -10,28 +10,6 @@ import type { TokenType } from '../modules/auth';
|
||||
import type { UserType } from '../modules/users';
|
||||
import type { InvitationType, WorkspaceType } from '../modules/workspaces';
|
||||
|
||||
export class NestDebugLogger implements LoggerService {
|
||||
log(message: string): any {
|
||||
console.log(message);
|
||||
}
|
||||
|
||||
error(message: string, trace: string): any {
|
||||
console.error(message, trace);
|
||||
}
|
||||
|
||||
warn(message: string): any {
|
||||
console.warn(message);
|
||||
}
|
||||
|
||||
debug(message: string): any {
|
||||
console.debug(message);
|
||||
}
|
||||
|
||||
verbose(message: string): any {
|
||||
console.log(message);
|
||||
}
|
||||
}
|
||||
|
||||
const gql = '/graphql';
|
||||
|
||||
async function signUp(
|
||||
|
||||
Reference in New Issue
Block a user