Use string interpolation
This commit is contained in:
		| @@ -22,7 +22,7 @@ const router = new Router(); | ||||
| function inbox(ctx: Router.IRouterContext) { | ||||
| 	let signature; | ||||
|  | ||||
| 	ctx.req.headers.authorization = 'Signature ' + ctx.req.headers.signature; | ||||
| 	ctx.req.headers.authorization = `Signature ${ctx.req.headers.signature}`; | ||||
|  | ||||
| 	try { | ||||
| 		signature = httpSignature.parseRequest(ctx.req, { 'headers': [] }); | ||||
|   | ||||
| @@ -79,7 +79,7 @@ const files = glob.sync('**/*.js', { | ||||
| }); | ||||
|  | ||||
| const endpoints: IEndpoint[] = files.map(f => { | ||||
| 	const ep = require('./endpoints/' + f); | ||||
| 	const ep = require(`./endpoints/${f}`); | ||||
|  | ||||
| 	return { | ||||
| 		name: f.replace('.js', ''), | ||||
|   | ||||
| @@ -16,7 +16,7 @@ export default function(request: websocket.request, connection: websocket.connec | ||||
|  | ||||
| 		switch (msg.type) { | ||||
| 			case 'requestLog': | ||||
| 				ev.once('notesStatsLog:' + msg.id, statsLog => { | ||||
| 				ev.once(`notesStatsLog:${msg.id}`, statsLog => { | ||||
| 					connection.send(JSON.stringify({ | ||||
| 						type: 'statsLog', | ||||
| 						body: statsLog | ||||
|   | ||||
| @@ -16,7 +16,7 @@ export default function(request: websocket.request, connection: websocket.connec | ||||
|  | ||||
| 		switch (msg.type) { | ||||
| 			case 'requestLog': | ||||
| 				ev.once('serverStatsLog:' + msg.id, statsLog => { | ||||
| 				ev.once(`serverStatsLog:${msg.id}`, statsLog => { | ||||
| 					connection.send(JSON.stringify({ | ||||
| 						type: 'statsLog', | ||||
| 						body: statsLog | ||||
|   | ||||
| @@ -196,7 +196,7 @@ router.get('/*/api/entities/*', async ctx => { | ||||
| 	const lang = ctx.params[0]; | ||||
| 	const entity = ctx.params[1]; | ||||
|  | ||||
| 	const x = yaml.safeLoad(fs.readFileSync(path.resolve(__dirname + '/../../../src/docs/api/entities/' + entity + '.yaml'), 'utf-8')) as any; | ||||
| 	const x = yaml.safeLoad(fs.readFileSync(path.resolve(`${__dirname}/../../../src/docs/api/entities/${entity}.yaml`), 'utf-8')) as any; | ||||
|  | ||||
| 	await ctx.render('../../../../src/docs/api/entities/view', Object.assign(await genVars(lang), { | ||||
| 		id: `api/entities/${entity}`, | ||||
|   | ||||
| @@ -2,7 +2,7 @@ extends ../../../../src/client/app/base | ||||
|  | ||||
| block vars | ||||
| 	- const title = user.name ? `${user.name} (@${user.username})` : `@${user.username}`; | ||||
| 	- const url = config.url + '/@' + (user.host ? `${user.username}@${user.host}` : user.username); | ||||
| 	- const url = `${config.url}/@${(user.host ? `${user.username}@${user.host}` : user.username)}`; | ||||
| 	- const img = user.avatarId ? `${config.drive_url}/${user.avatarId}` : null; | ||||
|  | ||||
| block title | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Aya Morisawa
					Aya Morisawa