0
0
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 rndstr from 'rndstr';
import $ from 'cafy'; import $ from 'cafy';
import App from '../../models/app'; import App from '../../models/app';
import { isValidNameId } from '../../models/app'; import { isValidNameId }, { pack } from '../../models/app';
import { pack } from '../../models/app';
/** /**
* @swagger * @swagger

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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