mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 10:49:28 +02:00
Type models
This commit is contained in:
parent
65fcc3119c
commit
e02643f32e
76 changed files with 1710 additions and 816 deletions
|
@ -1,6 +1,8 @@
|
|||
const db = require('../initializers/database')
|
||||
const logger = require('../helpers/logger')
|
||||
const peertubeCrypto = require('../helpers/peertube-crypto')
|
||||
import { database as db } from '../initializers'
|
||||
import {
|
||||
logger,
|
||||
checkSignature as peertubeCryptoCheckSignature
|
||||
} from '../helpers'
|
||||
|
||||
function checkSignature (req, res, next) {
|
||||
const host = req.body.signature.host
|
||||
|
@ -26,7 +28,7 @@ function checkSignature (req, res, next) {
|
|||
signatureShouldBe = host
|
||||
}
|
||||
|
||||
const signatureOk = peertubeCrypto.checkSignature(pod.publicKey, signatureShouldBe, req.body.signature.signature)
|
||||
const signatureOk = peertubeCryptoCheckSignature(pod.publicKey, signatureShouldBe, req.body.signature.signature)
|
||||
|
||||
if (signatureOk === true) {
|
||||
res.locals.secure = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue