wip
This commit is contained in:
parent
718060dc85
commit
2cb0511dba
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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';
|
||||
|
||||
/**
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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';
|
||||
|
||||
/**
|
||||
|
@ -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';
|
||||
|
@ -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
|
||||
|
@ -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';
|
||||
|
||||
/**
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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';
|
||||
|
||||
/**
|
||||
|
@ -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
|
||||
|
@ -1,8 +1,7 @@
|
||||
/**
|
||||
* Module dependencies
|
||||
*/
|
||||
import User from '../models/user';
|
||||
import { pack } from '../models/user';
|
||||
import User, { pack } from '../models/user';
|
||||
|
||||
/**
|
||||
* Show myself
|
||||
|
@ -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
|
||||
|
@ -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';
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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';
|
||||
|
||||
/**
|
||||
|
@ -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');
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
||||
|
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user