mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-21 23:41:18 +01:00
Merge branch 'master' of github.com:crafatar/crafatar
This commit is contained in:
commit
b88db00b97
19
.editorconfig
Normal file
19
.editorconfig
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# We use EditorConfig to standardize settings between contributors
|
||||||
|
# See http://editorconfig.org for more info and plugin downloads
|
||||||
|
|
||||||
|
# This is the only config file
|
||||||
|
root = true
|
||||||
|
|
||||||
|
# Unix-style newlines with with new lines at the end
|
||||||
|
[*]
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
# Use utf-8 for character encoding
|
||||||
|
[*.{js, json, yml}]
|
||||||
|
charset = utf-8
|
||||||
|
|
||||||
|
# 2 space indents
|
||||||
|
[*.{js, json, yml}]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
@ -55,13 +55,13 @@ exp.get_from_options = function(rid, url, options, callback) {
|
|||||||
// 200 or 301 depending on content type
|
// 200 or 301 depending on content type
|
||||||
if (!error && (response.statusCode === 200 || response.statusCode === 301)) {
|
if (!error && (response.statusCode === 200 || response.statusCode === 301)) {
|
||||||
// response received successfully
|
// response received successfully
|
||||||
logging.log(rid + url + " url received");
|
logging.log(rid + url + " response received");
|
||||||
callback(body, response, null);
|
callback(body, response, null);
|
||||||
} else if (error) {
|
} else if (error) {
|
||||||
callback(body || null, response, error);
|
callback(body || null, response, error);
|
||||||
} else if (response.statusCode === 404 || response.statusCode === 204) {
|
} else if (response.statusCode === 404 || response.statusCode === 204) {
|
||||||
// page does not exist
|
// page does not exist
|
||||||
logging.log(rid + url + " url does not exist");
|
logging.log(rid + url + " url or content does not exist");
|
||||||
callback(null, response, null);
|
callback(null, response, null);
|
||||||
} else if (response.statusCode === 429) {
|
} else if (response.statusCode === 429) {
|
||||||
// Too Many Requests exception - code 429
|
// Too Many Requests exception - code 429
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user