Fix build with typescript 3.8
This commit is contained in:
parent
3637106d7a
commit
366caf8b71
|
@ -240,7 +240,7 @@ async function up (utils: {
|
||||||
{
|
{
|
||||||
const query = 'SELECT * FROM "actor" WHERE "serverId" IS NULL AND "publicKey" IS NULL'
|
const query = 'SELECT * FROM "actor" WHERE "serverId" IS NULL AND "publicKey" IS NULL'
|
||||||
const options = { type: Sequelize.QueryTypes.SELECT as Sequelize.QueryTypes.SELECT }
|
const options = { type: Sequelize.QueryTypes.SELECT as Sequelize.QueryTypes.SELECT }
|
||||||
const [ res ] = await utils.sequelize.query(query, options)
|
const [ res ] = await utils.sequelize.query<any>(query, options)
|
||||||
|
|
||||||
for (const actor of res) {
|
for (const actor of res) {
|
||||||
const { privateKey, publicKey } = await createPrivateAndPublicKeys()
|
const { privateKey, publicKey } = await createPrivateAndPublicKeys()
|
||||||
|
|
|
@ -36,7 +36,7 @@ async function addVideoShares (shareUrls: string[], video: MVideoId) {
|
||||||
await Bluebird.map(shareUrls, async shareUrl => {
|
await Bluebird.map(shareUrls, async shareUrl => {
|
||||||
try {
|
try {
|
||||||
// Fetch url
|
// Fetch url
|
||||||
const { body } = await doRequest({
|
const { body } = await doRequest<any>({
|
||||||
uri: shareUrl,
|
uri: shareUrl,
|
||||||
json: true,
|
json: true,
|
||||||
activityPub: true
|
activityPub: true
|
||||||
|
|
|
@ -120,7 +120,7 @@ async function resolveParentComment (params: ResolveThreadParams) {
|
||||||
throw new Error('Recursion limit reached when resolving a thread')
|
throw new Error('Recursion limit reached when resolving a thread')
|
||||||
}
|
}
|
||||||
|
|
||||||
const { body } = await doRequest({
|
const { body } = await doRequest<any>({
|
||||||
uri: url,
|
uri: url,
|
||||||
json: true,
|
json: true,
|
||||||
activityPub: true
|
activityPub: true
|
||||||
|
|
|
@ -18,7 +18,7 @@ async function createRates (ratesUrl: string[], video: MVideo, rate: VideoRateTy
|
||||||
await Bluebird.map(ratesUrl, async rateUrl => {
|
await Bluebird.map(ratesUrl, async rateUrl => {
|
||||||
try {
|
try {
|
||||||
// Fetch url
|
// Fetch url
|
||||||
const { body } = await doRequest({
|
const { body } = await doRequest<any>({
|
||||||
uri: rateUrl,
|
uri: rateUrl,
|
||||||
json: true,
|
json: true,
|
||||||
activityPub: true
|
activityPub: true
|
||||||
|
|
|
@ -27,7 +27,7 @@ async function listAvailablePluginsFromIndex (options: PeertubePluginIndexList)
|
||||||
const uri = CONFIG.PLUGINS.INDEX.URL + '/api/v1/plugins'
|
const uri = CONFIG.PLUGINS.INDEX.URL + '/api/v1/plugins'
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const { body } = await doRequest({ uri, qs, json: true })
|
const { body } = await doRequest<any>({ uri, qs, json: true })
|
||||||
|
|
||||||
logger.debug('Got result from PeerTube index.', { body })
|
logger.debug('Got result from PeerTube index.', { body })
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ async function getLatestPluginsVersion (npmNames: string[]): Promise<PeertubePlu
|
||||||
|
|
||||||
const uri = CONFIG.PLUGINS.INDEX.URL + '/api/v1/plugins/latest-version'
|
const uri = CONFIG.PLUGINS.INDEX.URL + '/api/v1/plugins/latest-version'
|
||||||
|
|
||||||
const { body } = await doRequest({ uri, body: bodyRequest, json: true, method: 'POST' })
|
const { body } = await doRequest<any>({ uri, body: bodyRequest, json: true, method: 'POST' })
|
||||||
|
|
||||||
return body
|
return body
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ export class AutoFollowIndexInstances extends AbstractScheduler {
|
||||||
|
|
||||||
this.lastCheck = new Date()
|
this.lastCheck = new Date()
|
||||||
|
|
||||||
const { body } = await doRequest({ uri, qs, json: true })
|
const { body } = await doRequest<any>({ uri, qs, json: true })
|
||||||
|
|
||||||
const hosts: string[] = body.data.map(o => o.host)
|
const hosts: string[] = body.data.map(o => o.host)
|
||||||
const chunks = chunk(hosts, 20)
|
const chunks = chunk(hosts, 20)
|
||||||
|
|
Loading…
Reference in New Issue