mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-24 19:53:09 +02:00
better readable code
This commit is contained in:
parent
2e39106c4b
commit
9f064d76d9
1 changed files with 5 additions and 6 deletions
|
@ -24,12 +24,11 @@ export default (params: any, me: ILocalUser) => new Promise(async (res, rej) =>
|
||||||
var offset = params.offset
|
var offset = params.offset
|
||||||
var timeout = config.user_recommendation.timeout
|
var timeout = config.user_recommendation.timeout
|
||||||
var engine = config.user_recommendation.engine
|
var engine = config.user_recommendation.engine
|
||||||
var url
|
const url = engine
|
||||||
url = engine
|
.replace('{{host}}', hostName)
|
||||||
url = url.replace('{{host}}', hostName)
|
.replace('{{user}}', userName)
|
||||||
url = url.replace('{{user}}', userName)
|
.replace('{{limit}}', limit)
|
||||||
url = url.replace('{{limit}}', limit)
|
.replace('{{offset}}', offset)
|
||||||
url = url.replace('{{offset}}', offset)
|
|
||||||
request(
|
request(
|
||||||
{
|
{
|
||||||
url: url,
|
url: url,
|
||||||
|
|
Loading…
Reference in a new issue