Refactor
This commit is contained in:
@ -3,7 +3,7 @@ import * as express from 'express';
|
||||
import { parseRequest, verifySignature } from 'http-signature';
|
||||
import User, { IRemoteUser } from '../../models/user';
|
||||
import queue from '../../queue';
|
||||
import parseAcct from '../../common/user/parse-acct';
|
||||
import parseAcct from '../../misc/user/parse-acct';
|
||||
|
||||
const app = express();
|
||||
app.disable('x-powered-by');
|
||||
|
@ -1,7 +1,7 @@
|
||||
import * as express from 'express';
|
||||
import context from '../../common/remote/activitypub/renderer/context';
|
||||
import renderNote from '../../common/remote/activitypub/renderer/note';
|
||||
import renderOrderedCollection from '../../common/remote/activitypub/renderer/ordered-collection';
|
||||
import context from '../../remote/activitypub/renderer/context';
|
||||
import renderNote from '../../remote/activitypub/renderer/note';
|
||||
import renderOrderedCollection from '../../remote/activitypub/renderer/ordered-collection';
|
||||
import config from '../../conf';
|
||||
import Post from '../../models/post';
|
||||
import withUser from './with-user';
|
||||
|
@ -1,7 +1,7 @@
|
||||
import * as express from 'express';
|
||||
import context from '../../common/remote/activitypub/renderer/context';
|
||||
import render from '../../common/remote/activitypub/renderer/note';
|
||||
import parseAcct from '../../common/user/parse-acct';
|
||||
import context from '../../remote/activitypub/renderer/context';
|
||||
import render from '../../remote/activitypub/renderer/note';
|
||||
import parseAcct from '../../misc/user/parse-acct';
|
||||
import Post from '../../models/post';
|
||||
import User from '../../models/user';
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import * as express from 'express';
|
||||
import context from '../../common/remote/activitypub/renderer/context';
|
||||
import render from '../../common/remote/activitypub/renderer/key';
|
||||
import context from '../../remote/activitypub/renderer/context';
|
||||
import render from '../../remote/activitypub/renderer/key';
|
||||
import config from '../../conf';
|
||||
import withUser from './with-user';
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import * as express from 'express';
|
||||
import config from '../../conf';
|
||||
import context from '../../common/remote/activitypub/renderer/context';
|
||||
import render from '../../common/remote/activitypub/renderer/person';
|
||||
import context from '../../remote/activitypub/renderer/context';
|
||||
import render from '../../remote/activitypub/renderer/person';
|
||||
import withUser from './with-user';
|
||||
|
||||
const respond = withUser(username => `${config.url}/@${username}`, (user, req, res) => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import parseAcct from '../../common/user/parse-acct';
|
||||
import parseAcct from '../../misc/user/parse-acct';
|
||||
import User from '../../models/user';
|
||||
|
||||
export default (redirect, respond) => async (req, res, next) => {
|
||||
|
@ -3,10 +3,10 @@ import * as bcrypt from 'bcryptjs';
|
||||
|
||||
import User, { IUser, init as initUser, ILocalUser } from '../../../models/user';
|
||||
|
||||
import getPostSummary from '../../../common/get-post-summary';
|
||||
import getUserSummary from '../../../common/user/get-summary';
|
||||
import parseAcct from '../../../common/user/parse-acct';
|
||||
import getNotificationSummary from '../../../common/get-notification-summary';
|
||||
import getPostSummary from '../../../misc/get-post-summary';
|
||||
import getUserSummary from '../../../misc/user/get-summary';
|
||||
import parseAcct from '../../../misc/user/parse-acct';
|
||||
import getNotificationSummary from '../../../misc/get-notification-summary';
|
||||
|
||||
const hmm = [
|
||||
'?',
|
||||
|
@ -7,9 +7,9 @@ import config from '../../../../conf';
|
||||
import BotCore from '../core';
|
||||
import _redis from '../../../../db/redis';
|
||||
import prominence = require('prominence');
|
||||
import getAcct from '../../../../common/user/get-acct';
|
||||
import parseAcct from '../../../../common/user/parse-acct';
|
||||
import getPostSummary from '../../../../common/get-post-summary';
|
||||
import getAcct from '../../../../misc/user/get-acct';
|
||||
import parseAcct from '../../../../misc/user/parse-acct';
|
||||
import getPostSummary from '../../../../misc/get-post-summary';
|
||||
|
||||
const redis = prominence(_redis);
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
*/
|
||||
import $ from 'cafy';
|
||||
import { pack } from '../../../../../models/drive-file';
|
||||
import uploadFromUrl from '../../../../../common/drive/upload_from_url';
|
||||
import uploadFromUrl from '../../../../../common/drive/upload-from-url';
|
||||
|
||||
/**
|
||||
* Create a file from a URL
|
||||
|
@ -1,6 +1,6 @@
|
||||
import $ from 'cafy';
|
||||
import OthelloGame, { pack } from '../../../../../models/othello-game';
|
||||
import Othello from '../../../../../common/othello/core';
|
||||
import Othello from '../../../../../misc/othello/core';
|
||||
|
||||
module.exports = (params, user) => new Promise(async (res, rej) => {
|
||||
// Get 'gameId' parameter
|
||||
|
@ -3,7 +3,7 @@ import Matching, { pack as packMatching } from '../../../../models/othello-match
|
||||
import OthelloGame, { pack as packGame } from '../../../../models/othello-game';
|
||||
import User from '../../../../models/user';
|
||||
import publishUserStream, { publishOthelloStream } from '../../../../common/event';
|
||||
import { eighteight } from '../../../../common/othello/maps';
|
||||
import { eighteight } from '../../../../misc/othello/maps';
|
||||
|
||||
module.exports = (params, user) => new Promise(async (res, rej) => {
|
||||
// Get 'userId' parameter
|
||||
|
@ -17,8 +17,8 @@ import { pack } from '../../../../models/post';
|
||||
import watch from '../../common/watch-post';
|
||||
import event, { pushSw, publishChannelStream } from '../../../../common/event';
|
||||
import notify from '../../../../common/notify';
|
||||
import getAcct from '../../../../common/user/get-acct';
|
||||
import parseAcct from '../../../../common/user/parse-acct';
|
||||
import getAcct from '../../../../misc/user/get-acct';
|
||||
import parseAcct from '../../../../misc/user/parse-acct';
|
||||
import config from '../../../../conf';
|
||||
|
||||
/**
|
||||
|
@ -3,7 +3,7 @@
|
||||
*/
|
||||
import $ from 'cafy';
|
||||
import User, { pack } from '../../../../models/user';
|
||||
import resolveRemoteUser from '../../../../common/remote/resolve-user';
|
||||
import resolveRemoteUser from '../../../../remote/resolve-user';
|
||||
|
||||
const cursorOption = { fields: { data: false } };
|
||||
|
||||
|
@ -3,7 +3,7 @@ import * as debug from 'debug';
|
||||
import limiterDB from '../../db/redis';
|
||||
import { Endpoint } from './endpoints';
|
||||
import { IAuthContext } from './authenticate';
|
||||
import getAcct from '../../common/user/get-acct';
|
||||
import getAcct from '../../misc/user/get-acct';
|
||||
|
||||
const log = debug('misskey:limitter');
|
||||
|
||||
|
@ -3,8 +3,8 @@ import * as redis from 'redis';
|
||||
import * as CRC32 from 'crc-32';
|
||||
import OthelloGame, { pack } from '../../../models/othello-game';
|
||||
import { publishOthelloGameStream } from '../../../common/event';
|
||||
import Othello from '../../../common/othello/core';
|
||||
import * as maps from '../../../common/othello/maps';
|
||||
import Othello from '../../../misc/othello/core';
|
||||
import * as maps from '../../../misc/othello/maps';
|
||||
import { ParsedUrlQuery } from 'querystring';
|
||||
|
||||
export default function(request: websocket.request, connection: websocket.connection, subscriber: redis.RedisClient, user?: any): void {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import config from '../conf';
|
||||
import parseAcct from '../common/user/parse-acct';
|
||||
import parseAcct from '../misc/user/parse-acct';
|
||||
import User from '../models/user';
|
||||
const express = require('express');
|
||||
|
||||
|
Reference in New Issue
Block a user