RENAME: api --> services

This commit is contained in:
syuilo 2018-04-06 03:10:25 +09:00
parent 0de40f3a76
commit b6aeacdeb9
14 changed files with 8 additions and 8 deletions

View file

@ -1,6 +1,6 @@
import * as request from 'request-promise-native';
import User from '../../../models/user';
import createPost from '../../../api/post/create';
import createPost from '../../../services/post/create';
export default async ({ data }) => {
const asyncBot = User.findOne({ _id: data.userId });

View file

@ -3,8 +3,8 @@ import * as debug from 'debug';
import Resolver from '../resolver';
import Post from '../../../models/post';
import uploadFromUrl from '../../../api/drive/upload-from-url';
import createPost from '../../../api/post/create';
import uploadFromUrl from '../../../services/drive/upload-from-url';
import createPost from '../../../services/post/create';
import { IRemoteUser, isRemoteUser } from '../../../models/user';
import resolvePerson from '../resolve-person';

View file

@ -1,7 +1,7 @@
import parseAcct from '../../../acct/parse';
import User from '../../../models/user';
import config from '../../../config';
import follow from '../../../api/following/create';
import follow from '../../../services/following/create';
export default async (actor, activity): Promise<void> => {
const prefix = config.url + '/@';

View file

@ -1,7 +1,7 @@
import parseAcct from '../../../acct/parse';
import User from '../../../models/user';
import config from '../../../config';
import unfollow from '../../../api/following/delete';
import unfollow from '../../../services/following/delete';
export default async (actor, activity): Promise<void> => {
const prefix = config.url + '/@';

View file

@ -3,7 +3,7 @@ import { toUnicode } from 'punycode';
import User, { validateUsername, isValidName, isValidDescription } from '../../models/user';
import webFinger from '../webfinger';
import Resolver from './resolver';
import uploadFromUrl from '../../api/drive/upload-from-url';
import uploadFromUrl from '../../services/drive/upload-from-url';
export default async (value, verifier?: string) => {
const resolver = new Resolver();

View file

@ -4,7 +4,7 @@
import $ from 'cafy';
import User from '../../../../models/user';
import Following from '../../../../models/following';
import create from '../../../../api/following/create';
import create from '../../../../services/following/create';
/**
* Follow a user

View file

@ -7,7 +7,7 @@ import Post, { IPost, isValidText, isValidCw, pack } from '../../../../models/po
import { ILocalUser } from '../../../../models/user';
import Channel, { IChannel } from '../../../../models/channel';
import DriveFile from '../../../../models/drive-file';
import create from '../../../../api/post/create';
import create from '../../../../services/post/create';
import { IApp } from '../../../../models/app';
/**

View file