This commit is contained in:
こぴなたみぽ 2018-02-02 10:31:17 +09:00
parent 718060dc85
commit 2cb0511dba
40 changed files with 40 additions and 80 deletions

View file

@ -4,8 +4,7 @@
import rndstr from 'rndstr';
import $ from 'cafy';
import App from '../../models/app';
import { isValidNameId } from '../../models/app';
import { pack } from '../../models/app';
import { isValidNameId }, { pack } from '../../models/app';
/**
* @swagger

View file

@ -2,8 +2,7 @@
* Module dependencies
*/
import $ from 'cafy';
import App from '../../models/app';
import { pack } from '../../models/app';
import App, { pack } from '../../models/app';
/**
* @swagger

View file

@ -2,8 +2,7 @@
* Module dependencies
*/
import $ from 'cafy';
import AuthSess from '../../../models/auth-session';
import { pack } from '../../../models/auth-session';
import AuthSess, { pack } from '../../../models/auth-session';
/**
* @swagger

View file

@ -2,8 +2,7 @@
* Module dependencies
*/
import $ from 'cafy';
import Channel from '../models/channel';
import { pack } from '../models/channel';
import Channel, { pack } from '../models/channel';
/**
* Get all channels

View file

@ -3,8 +3,7 @@
*/
import $ from 'cafy';
import { default as Channel, IChannel } from '../../models/channel';
import Post from '../../models/post';
import { pack } from '../../models/post';
import Post, { pack } from '../../models/post';
/**
* Show a posts of a channel

View file

@ -2,8 +2,7 @@
* Module dependencies
*/
import $ from 'cafy';
import { default as Channel, IChannel } from '../../models/channel';
import { pack } from '../../models/channel';
import { default as Channel, IChannel }, { pack } from '../../models/channel';
/**
* Show a channel

View file

@ -2,8 +2,7 @@
* Module dependencies
*/
import $ from 'cafy';
import DriveFile from '../../models/drive-file';
import { pack } from '../../models/drive-file';
import DriveFile, { pack } from '../../models/drive-file';
/**
* Get drive files

View file

@ -2,8 +2,7 @@
* Module dependencies
*/
import $ from 'cafy';
import { validateFileName } from '../../../models/drive-file';
import { pack } from '../../../models/drive-file';
import { validateFileName }, { pack } from '../../../models/drive-file';
import create from '../../../common/add-file-to-drive';
/**

View file

@ -2,8 +2,7 @@
* Module dependencies
*/
import $ from 'cafy';
import DriveFile from '../../../models/drive-file';
import { pack } from '../../../models/drive-file';
import DriveFile, { pack } from '../../../models/drive-file';
/**
* Find a file(s)

View file

@ -2,8 +2,7 @@
* Module dependencies
*/
import $ from 'cafy';
import DriveFile from '../../../models/drive-file';
import { pack } from '../../../models/drive-file';
import DriveFile, { pack } from '../../../models/drive-file';
/**
* Show a file

View file

@ -4,8 +4,7 @@
import $ from 'cafy';
import DriveFolder from '../../../models/drive-folder';
import DriveFile from '../../../models/drive-file';
import { validateFileName } from '../../../models/drive-file';
import { pack } from '../../../models/drive-file';
import { validateFileName }, { pack } from '../../../models/drive-file';
import { publishDriveStream } from '../../../event';
/**

View file

@ -3,8 +3,7 @@
*/
import * as URL from 'url';
import $ from 'cafy';
import { validateFileName } from '../../../models/drive-file';
import { pack } from '../../../models/drive-file';
import { validateFileName }, { pack } from '../../../models/drive-file';
import create from '../../../common/add-file-to-drive';
import * as debug from 'debug';
import * as tmp from 'tmp';

View file

@ -2,8 +2,7 @@
* Module dependencies
*/
import $ from 'cafy';
import DriveFolder from '../../models/drive-folder';
import { pack } from '../../models/drive-folder';
import DriveFolder, { pack } from '../../models/drive-folder';
/**
* Get drive folders

View file

@ -3,8 +3,7 @@
*/
import $ from 'cafy';
import DriveFolder from '../../../models/drive-folder';
import { isValidFolderName } from '../../../models/drive-folder';
import { pack } from '../../../models/drive-folder';
import { isValidFolderName }, { pack } from '../../../models/drive-folder';
import { publishDriveStream } from '../../../event';
/**

View file

@ -2,8 +2,7 @@
* Module dependencies
*/
import $ from 'cafy';
import DriveFolder from '../../../models/drive-folder';
import { pack } from '../../../models/drive-folder';
import DriveFolder, { pack } from '../../../models/drive-folder';
/**
* Find a folder(s)

View file

@ -2,8 +2,7 @@
* Module dependencies
*/
import $ from 'cafy';
import DriveFolder from '../../../models/drive-folder';
import { pack } from '../../../models/drive-folder';
import DriveFolder, { pack } from '../../../models/drive-folder';
/**
* Show a folder

View file

@ -3,8 +3,7 @@
*/
import $ from 'cafy';
import DriveFolder from '../../../models/drive-folder';
import { isValidFolderName } from '../../../models/drive-folder';
import { pack } from '../../../models/drive-folder';
import { isValidFolderName }, { pack } from '../../../models/drive-folder';
import { publishDriveStream } from '../../../event';
/**

View file

@ -2,8 +2,7 @@
* Module dependencies
*/
import $ from 'cafy';
import DriveFile from '../../models/drive-file';
import { pack } from '../../models/drive-file';
import DriveFile, { pack } from '../../models/drive-file';
/**
* Get drive stream

View file

@ -1,8 +1,7 @@
/**
* Module dependencies
*/
import User from '../models/user';
import { pack } from '../models/user';
import User, { pack } from '../models/user';
/**
* Show myself

View file

@ -2,8 +2,7 @@
* Module dependencies
*/
import $ from 'cafy';
import Signin from '../../models/signin';
import { pack } from '../../models/signin';
import Signin, { pack } from '../../models/signin';
/**
* Get signin history of my account

View file

@ -3,8 +3,7 @@
*/
import $ from 'cafy';
import User from '../../models/user';
import { isValidName, isValidDescription, isValidLocation, isValidBirthday } from '../../models/user';
import { pack } from '../../models/user';
import { isValidName, isValidDescription, isValidLocation, isValidBirthday }, { pack } from '../../models/user';
import event from '../../event';
import config from '../../../conf';

View file

@ -2,8 +2,7 @@
* Module dependencies
*/
import $ from 'cafy';
import App from '../../models/app';
import { pack } from '../../models/app';
import App, { pack } from '../../models/app';
/**
* Get my apps

View file

@ -2,8 +2,7 @@
* Module dependencies
*/
import $ from 'cafy';
import Post from '../models/post';
import { pack } from '../models/post';
import Post, { pack } from '../models/post';
/**
* Lists all posts

View file

@ -2,8 +2,7 @@
* Module dependencies
*/
import $ from 'cafy';
import Post from '../../models/post';
import { pack } from '../../models/post';
import Post, { pack } from '../../models/post';
/**
* Show a context of a post

View file

@ -3,8 +3,7 @@
*/
import $ from 'cafy';
import Vote from '../../../models/poll-vote';
import Post from '../../../models/post';
import { pack } from '../../../models/post';
import Post, { pack } from '../../../models/post';
/**
* Get recommended polls

View file

@ -3,8 +3,7 @@
*/
import $ from 'cafy';
import Post from '../../models/post';
import Reaction from '../../models/post-reaction';
import { pack } from '../../models/post-reaction';
import Reaction, { pack } from '../../models/post-reaction';
/**
* Show reactions of a post

View file

@ -2,8 +2,7 @@
* Module dependencies
*/
import $ from 'cafy';
import Post from '../../models/post';
import { pack } from '../../models/post';
import Post, { pack } from '../../models/post';
/**
* Show a replies of a post

View file

@ -2,8 +2,7 @@
* Module dependencies
*/
import $ from 'cafy';
import Post from '../../models/post';
import { pack } from '../../models/post';
import Post, { pack } from '../../models/post';
/**
* Show a reposts of a post

View file

@ -2,8 +2,7 @@
* Module dependencies
*/
import $ from 'cafy';
import Post from '../../models/post';
import { pack } from '../../models/post';
import Post, { pack } from '../../models/post';
/**
* Show a post

View file

@ -3,8 +3,7 @@
*/
const ms = require('ms');
import $ from 'cafy';
import Post from '../../models/post';
import { pack } from '../../models/post';
import Post, { pack } from '../../models/post';
/**
* Get trend posts

View file

@ -2,8 +2,7 @@
* Module dependencies
*/
import $ from 'cafy';
import User from '../models/user';
import { pack } from '../models/user';
import User, { pack } from '../models/user';
/**
* Lists all users

View file

@ -3,8 +3,7 @@
*/
import $ from 'cafy';
import Post from '../../models/post';
import User from '../../models/user';
import { pack } from '../../models/user';
import User, { pack } from '../../models/user';
module.exports = (params, me) => new Promise(async (res, rej) => {
// Get 'user_id' parameter

View file

@ -3,8 +3,7 @@
*/
import $ from 'cafy';
import Post from '../../models/post';
import User from '../../models/user';
import { pack } from '../../models/post';
import User, { pack } from '../../models/user';
/**
* Get posts of a user

View file

@ -3,8 +3,7 @@
*/
const ms = require('ms');
import $ from 'cafy';
import User from '../../models/user';
import { pack } from '../../models/user';
import User, { pack } from '../../models/user';
import getFriends from '../../common/get-friends';
/**

View file

@ -3,8 +3,7 @@
*/
import * as mongo from 'mongodb';
import $ from 'cafy';
import User from '../../models/user';
import { pack } from '../../models/user';
import User, { pack } from '../../models/user';
import config from '../../../conf';
const escapeRegexp = require('escape-regexp');

View file

@ -2,8 +2,7 @@
* Module dependencies
*/
import $ from 'cafy';
import User from '../../models/user';
import { pack } from '../../models/user';
import User, { pack } from '../../models/user';
/**
* Search a user by username

View file

@ -2,8 +2,7 @@
* Module dependencies
*/
import $ from 'cafy';
import User from '../../models/user';
import { pack } from '../../models/user';
import User, { pack } from '../../models/user';
/**
* Show a user

View file

@ -2,8 +2,7 @@ import * as express from 'express';
import * as bcrypt from 'bcryptjs';
import * as speakeasy from 'speakeasy';
import { default as User, IUser } from '../models/user';
import Signin from '../models/signin';
import { pack } from '../models/signin';
import Signin, { pack } from '../models/signin';
import event from '../event';
import signin from '../common/signin';
import config from '../../conf';

View file

@ -3,8 +3,7 @@ import * as express from 'express';
import * as bcrypt from 'bcryptjs';
import recaptcha = require('recaptcha-promise');
import { default as User, IUser } from '../models/user';
import { validateUsername, validatePassword } from '../models/user';
import { pack } from '../models/user';
import { validateUsername, validatePassword }, { pack } from '../models/user';
import generateUserToken from '../common/generate-native-user-token';
import config from '../../conf';

View file

@ -5,8 +5,7 @@ import * as uuid from 'uuid';
// const Twitter = require('twitter');
import autwh from 'autwh';
import redis from '../../db/redis';
import User from '../models/user';
import { pack } from '../models/user';
import User, { pack } from '../models/user';
import event from '../event';
import config from '../../conf';
import signin from '../common/signin';