From 3fd3ab2d34d512b160a5e6084d7609be7b4f4452 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 12 Dec 2017 17:53:50 +0100 Subject: Move models to typescript-sequelize --- server/helpers/peertube-crypto.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/helpers/peertube-crypto.ts') diff --git a/server/helpers/peertube-crypto.ts b/server/helpers/peertube-crypto.ts index 74e4cc703..c4c735cb8 100644 --- a/server/helpers/peertube-crypto.ts +++ b/server/helpers/peertube-crypto.ts @@ -1,5 +1,5 @@ import { BCRYPT_SALT_SIZE, PRIVATE_RSA_KEY_SIZE } from '../initializers' -import { AccountInstance } from '../models/account/account-interface' +import { AccountModel } from '../models/account/account' import { bcryptComparePromise, bcryptGenSaltPromise, bcryptHashPromise, createPrivateKey, getPublicKey } from './core-utils' import { jsig } from './custom-jsonld-signature' import { logger } from './logger' @@ -13,7 +13,7 @@ async function createPrivateAndPublicKeys () { return { privateKey: key, publicKey } } -function isSignatureVerified (fromAccount: AccountInstance, signedDocument: object) { +function isSignatureVerified (fromAccount: AccountModel, signedDocument: object) { const publicKeyObject = { '@context': jsig.SECURITY_CONTEXT_URL, '@id': fromAccount.url, @@ -40,7 +40,7 @@ function isSignatureVerified (fromAccount: AccountInstance, signedDocument: obje }) } -function signObject (byAccount: AccountInstance, data: any) { +function signObject (byAccount: AccountModel, data: any) { const options = { privateKeyPem: byAccount.privateKey, creator: byAccount.url -- cgit v1.2.3