Update misc.js

pull/14084/head
Rodrigo Nascimento 6 years ago committed by GitHub
parent 33729fe7a8
commit 9dffb8e458
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      app/api/server/v1/misc.js

@ -50,8 +50,8 @@ let onlineCacheDate = 0;
const cacheInvalid = 60000; // 1 minute
API.v1.addRoute('shield.svg', { authRequired: false }, {
get() {
const { type, name, icon } = this.queryParams;
let { channel } = this.queryParams;
const { type, icon } = this.queryParams;
let { channel, name } = this.queryParams;
if (!settings.get('API_Enable_Shields')) {
throw new Meteor.Error('error-endpoint-disabled', 'This endpoint is disabled', { route: '/api/v1/shield.svg' });
}
@ -120,6 +120,7 @@ API.v1.addRoute('shield.svg', { authRequired: false }, {
channel = s.escapeHTML(channel);
text = s.escapeHTML(text);
name = s.escapeHTML(name);
return {
headers: { 'Content-Type': 'image/svg+xml;charset=utf-8' },

Loading…
Cancel
Save