diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-20 09:43:39 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 19:40:52 +0100 |
commit | 54141398354e6e7b94aa3065a705a1251390111c (patch) | |
tree | 8d30d1b9ea8acbe04f6d404125b04fc0c9897b70 /server/lib/user.ts | |
parent | eb8b27c93e61a896a08923dc1ca3c87ba8cf4948 (diff) | |
download | PeerTube-54141398354e6e7b94aa3065a705a1251390111c.tar.gz PeerTube-54141398354e6e7b94aa3065a705a1251390111c.tar.zst PeerTube-54141398354e6e7b94aa3065a705a1251390111c.zip |
Refractor activity pub lib/helpers
Diffstat (limited to 'server/lib/user.ts')
-rw-r--r-- | server/lib/user.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/user.ts b/server/lib/user.ts index 2d7b36b4f..d54ffc916 100644 --- a/server/lib/user.ts +++ b/server/lib/user.ts | |||
@@ -1,11 +1,11 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import { getActivityPubUrl } from '../helpers/activitypub' | ||
3 | import { createPrivateAndPublicKeys } from '../helpers/peertube-crypto' | 2 | import { createPrivateAndPublicKeys } from '../helpers/peertube-crypto' |
4 | import { database as db } from '../initializers' | 3 | import { database as db } from '../initializers' |
5 | import { CONFIG } from '../initializers/constants' | 4 | import { CONFIG } from '../initializers/constants' |
6 | import { UserInstance } from '../models' | 5 | import { UserInstance } from '../models' |
7 | import { createVideoChannel } from './video-channel' | 6 | import { createVideoChannel } from './video-channel' |
8 | import { logger } from '../helpers/logger' | 7 | import { logger } from '../helpers/logger' |
8 | import { getAccountActivityPubUrl } from '../helpers/activitypub' | ||
9 | 9 | ||
10 | async function createUserAccountAndChannel (user: UserInstance, validateUser = true) { | 10 | async function createUserAccountAndChannel (user: UserInstance, validateUser = true) { |
11 | const { account, videoChannel } = await db.sequelize.transaction(async t => { | 11 | const { account, videoChannel } = await db.sequelize.transaction(async t => { |
@@ -36,7 +36,7 @@ async function createUserAccountAndChannel (user: UserInstance, validateUser = t | |||
36 | } | 36 | } |
37 | 37 | ||
38 | async function createLocalAccountWithoutKeys (name: string, userId: number, applicationId: number, t: Sequelize.Transaction) { | 38 | async function createLocalAccountWithoutKeys (name: string, userId: number, applicationId: number, t: Sequelize.Transaction) { |
39 | const url = getActivityPubUrl('account', name) | 39 | const url = getAccountActivityPubUrl(name) |
40 | 40 | ||
41 | const accountInstance = db.Account.build({ | 41 | const accountInstance = db.Account.build({ |
42 | name, | 42 | name, |