mirror of
https://github.com/azures04/crafatar.git
synced 2026-05-06 19:10:38 +02:00
Code cleanup
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
var networking = require("../modules/networking");
|
||||
var logging = require("../modules/logging");
|
||||
var helpers = require("../modules/helpers");
|
||||
var config = require("../modules/config");
|
||||
@@ -49,7 +48,7 @@ module.exports = function(req, res) {
|
||||
logging.log(uuid + " - " + human_status[status]);
|
||||
if (err) {
|
||||
logging.error(uuid + " " + err);
|
||||
if (err.code == "ENOENT") {
|
||||
if (err.code === "ENOENT") {
|
||||
cache.remove_hash(uuid);
|
||||
}
|
||||
}
|
||||
@@ -75,7 +74,7 @@ module.exports = function(req, res) {
|
||||
}
|
||||
|
||||
function handle_default(http_status, img_status, uuid) {
|
||||
if (def && def != "steve" && def != "alex") {
|
||||
if (def && def !== "steve" && def !== "alex") {
|
||||
logging.log(uuid + " status: 301");
|
||||
res.writeHead(301, {
|
||||
"Cache-Control": "max-age=" + config.browser_cache_time + ", public",
|
||||
|
||||
@@ -90,7 +90,7 @@ module.exports = function(req, res) {
|
||||
// default alex/steve images can be rendered, but
|
||||
// custom images will not be
|
||||
function handle_default(http_status, img_status, uuid) {
|
||||
if (def && def != "steve" && def != "alex") {
|
||||
if (def && def !== "steve" && def !== "alex") {
|
||||
logging.log(uuid + " status: 301");
|
||||
res.writeHead(301, {
|
||||
"Cache-Control": "max-age=" + config.browser_cache_time + ", public",
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
var networking = require("../modules/networking");
|
||||
var logging = require("../modules/logging");
|
||||
var helpers = require("../modules/helpers");
|
||||
var config = require("../modules/config");
|
||||
@@ -52,7 +51,7 @@ module.exports = function(req, res) {
|
||||
}
|
||||
|
||||
function handle_default(http_status, uuid) {
|
||||
if (def && def != "steve" && def != "alex") {
|
||||
if (def && def !== "steve" && def !== "alex") {
|
||||
logging.log(uuid + " status: 301");
|
||||
res.writeHead(301, {
|
||||
"Cache-Control": "max-age=" + config.browser_cache_time + ", public",
|
||||
|
||||
Reference in New Issue
Block a user