mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-23 23:53:09 +02:00
Refactor
This commit is contained in:
parent
012d744f4c
commit
563d604812
9 changed files with 8 additions and 8 deletions
|
@ -1,7 +1,7 @@
|
||||||
import { Context } from 'cafy';
|
import { Context } from 'cafy';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as glob from 'glob';
|
import * as glob from 'glob';
|
||||||
import { Schema } from '../../prelude/schema';
|
import { Schema } from '../../misc/schema';
|
||||||
|
|
||||||
export type Param = {
|
export type Param = {
|
||||||
validator: Context<any>;
|
validator: Context<any>;
|
||||||
|
|
|
@ -4,7 +4,7 @@ import config from '../../../config';
|
||||||
import { errors as basicErrors } from './errors';
|
import { errors as basicErrors } from './errors';
|
||||||
import { schemas } from './schemas';
|
import { schemas } from './schemas';
|
||||||
import { description } from './description';
|
import { description } from './description';
|
||||||
import { convertOpenApiSchema } from '../../../prelude/schema';
|
import { convertOpenApiSchema } from '../../../misc/schema';
|
||||||
|
|
||||||
export function genOpenapiSpec(lang = 'ja-JP') {
|
export function genOpenapiSpec(lang = 'ja-JP') {
|
||||||
const spec = {
|
const spec = {
|
||||||
|
|
|
@ -2,7 +2,7 @@ import autobind from 'autobind-decorator';
|
||||||
import Chart, { Obj } from './';
|
import Chart, { Obj } from './';
|
||||||
import DriveFile, { IDriveFile } from '../../models/drive-file';
|
import DriveFile, { IDriveFile } from '../../models/drive-file';
|
||||||
import { isLocalUser } from '../../models/user';
|
import { isLocalUser } from '../../models/user';
|
||||||
import { SchemaType } from '../../prelude/schema';
|
import { SchemaType } from '../../misc/schema';
|
||||||
|
|
||||||
const logSchema = {
|
const logSchema = {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -9,7 +9,7 @@ import * as mongo from 'mongodb';
|
||||||
import db from '../../db/mongodb';
|
import db from '../../db/mongodb';
|
||||||
import { ICollection } from 'monk';
|
import { ICollection } from 'monk';
|
||||||
import Logger from '../../misc/logger';
|
import Logger from '../../misc/logger';
|
||||||
import { Schema } from '../../prelude/schema';
|
import { Schema } from '../../misc/schema';
|
||||||
|
|
||||||
const logger = new Logger('chart');
|
const logger = new Logger('chart');
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ import autobind from 'autobind-decorator';
|
||||||
import Chart, { Obj } from '.';
|
import Chart, { Obj } from '.';
|
||||||
import Note, { INote } from '../../models/note';
|
import Note, { INote } from '../../models/note';
|
||||||
import { isLocalUser } from '../../models/user';
|
import { isLocalUser } from '../../models/user';
|
||||||
import { SchemaType } from '../../prelude/schema';
|
import { SchemaType } from '../../misc/schema';
|
||||||
|
|
||||||
const logSchema = {
|
const logSchema = {
|
||||||
total: {
|
total: {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import autobind from 'autobind-decorator';
|
import autobind from 'autobind-decorator';
|
||||||
import Chart, { Obj } from './';
|
import Chart, { Obj } from './';
|
||||||
import DriveFile, { IDriveFile } from '../../models/drive-file';
|
import DriveFile, { IDriveFile } from '../../models/drive-file';
|
||||||
import { SchemaType } from '../../prelude/schema';
|
import { SchemaType } from '../../misc/schema';
|
||||||
|
|
||||||
export const perUserDriveLogSchema = {
|
export const perUserDriveLogSchema = {
|
||||||
type: 'object' as 'object',
|
type: 'object' as 'object',
|
||||||
|
|
|
@ -2,7 +2,7 @@ import autobind from 'autobind-decorator';
|
||||||
import Chart, { Obj } from './';
|
import Chart, { Obj } from './';
|
||||||
import Note, { INote } from '../../models/note';
|
import Note, { INote } from '../../models/note';
|
||||||
import { IUser } from '../../models/user';
|
import { IUser } from '../../models/user';
|
||||||
import { SchemaType } from '../../prelude/schema';
|
import { SchemaType } from '../../misc/schema';
|
||||||
|
|
||||||
export const perUserNotesLogSchema = {
|
export const perUserNotesLogSchema = {
|
||||||
type: 'object' as 'object',
|
type: 'object' as 'object',
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import autobind from 'autobind-decorator';
|
import autobind from 'autobind-decorator';
|
||||||
import Chart, { Obj } from './';
|
import Chart, { Obj } from './';
|
||||||
import User, { IUser, isLocalUser } from '../../models/user';
|
import User, { IUser, isLocalUser } from '../../models/user';
|
||||||
import { SchemaType } from '../../prelude/schema';
|
import { SchemaType } from '../../misc/schema';
|
||||||
|
|
||||||
const logSchema = {
|
const logSchema = {
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue