mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
add .gitattributes and fix prettier/js warnings (#3094)
see title, as discussed in https://github.com/MichMich/MagicMirror/pull/3093
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
/**
|
||||
* A function to make HTTP requests via the server to avoid CORS-errors.
|
||||
*
|
||||
* @param {string} url the url to fetch from
|
||||
* @param {string} type what contenttype to expect in the response, can be "json" or "xml"
|
||||
* @param {boolean} useCorsProxy A flag to indicate
|
||||
@@ -35,7 +34,6 @@ async function performWebRequest(url, type = "json", useCorsProxy = false, reque
|
||||
|
||||
/**
|
||||
* Gets a URL that will be used when calling the CORS-method on the server.
|
||||
*
|
||||
* @param {string} url the url to fetch from
|
||||
* @param {Array.<{name: string, value:string}>} requestHeaders the HTTP headers to send
|
||||
* @param {Array.<string>} expectedResponseHeaders the expected HTTP headers to receive
|
||||
@@ -66,7 +64,6 @@ const getCorsUrl = function (url, requestHeaders, expectedResponseHeaders) {
|
||||
|
||||
/**
|
||||
* Gets the part of the CORS URL that represents the HTTP headers to send.
|
||||
*
|
||||
* @param {Array.<{name: string, value:string}>} requestHeaders the HTTP headers to send
|
||||
* @returns {string} to be used as request-headers component in CORS URL.
|
||||
*/
|
||||
@@ -87,7 +84,6 @@ const getRequestHeaderString = function (requestHeaders) {
|
||||
|
||||
/**
|
||||
* Gets headers and values to attach to the web request.
|
||||
*
|
||||
* @param {Array.<{name: string, value:string}>} requestHeaders the HTTP headers to send
|
||||
* @returns {object} An object specifying name and value of the headers.
|
||||
*/
|
||||
@@ -104,7 +100,6 @@ const getHeadersToSend = (requestHeaders) => {
|
||||
|
||||
/**
|
||||
* Gets the part of the CORS URL that represents the expected HTTP headers to receive.
|
||||
*
|
||||
* @param {Array.<string>} expectedResponseHeaders the expected HTTP headers to receive
|
||||
* @returns {string} to be used as the expected HTTP-headers component in CORS URL.
|
||||
*/
|
||||
@@ -125,7 +120,6 @@ const getExpectedResponseHeadersString = function (expectedResponseHeaders) {
|
||||
|
||||
/**
|
||||
* Gets the values for the expected headers from the response.
|
||||
*
|
||||
* @param {Array.<string>} expectedResponseHeaders the expected HTTP headers to receive
|
||||
* @param {Response} response the HTTP response
|
||||
* @returns {string} to be used as the expected HTTP-headers component in CORS URL.
|
||||
@@ -145,7 +139,6 @@ const getHeadersFromResponse = (expectedResponseHeaders, response) => {
|
||||
|
||||
/**
|
||||
* Format the time according to the config
|
||||
*
|
||||
* @param {object} config The config of the module
|
||||
* @param {object} time time to format
|
||||
* @returns {string} The formatted time string
|
||||
|
Reference in New Issue
Block a user