mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-05 22:57:11 -04:00
handler/APIHandler: use jshint
This commit is contained in:
parent
1f41ef3365
commit
da7098168e
1 changed files with 28 additions and 28 deletions
|
@ -72,7 +72,7 @@ var functions = {
|
||||||
exports.handle = function(functionName, fields, req, res)
|
exports.handle = function(functionName, fields, req, res)
|
||||||
{
|
{
|
||||||
//check the api key!
|
//check the api key!
|
||||||
if(fields["apikey"] != apikey.trim())
|
if(fields.apikey != apikey.trim())
|
||||||
{
|
{
|
||||||
res.send({code: 4, message: "no or wrong API Key", data: null});
|
res.send({code: 4, message: "no or wrong API Key", data: null});
|
||||||
return;
|
return;
|
||||||
|
@ -107,7 +107,7 @@ exports.handle = function(functionName, fields, req, res)
|
||||||
functionParams.push(function(err, data)
|
functionParams.push(function(err, data)
|
||||||
{
|
{
|
||||||
// no error happend, everything is fine
|
// no error happend, everything is fine
|
||||||
if(err == null)
|
if(!err)
|
||||||
{
|
{
|
||||||
if(!data)
|
if(!data)
|
||||||
data = null;
|
data = null;
|
||||||
|
@ -129,7 +129,7 @@ exports.handle = function(functionName, fields, req, res)
|
||||||
|
|
||||||
//call the api function
|
//call the api function
|
||||||
api[functionName](functionParams[0],functionParams[1],functionParams[2],functionParams[3],functionParams[4]);
|
api[functionName](functionParams[0],functionParams[1],functionParams[2],functionParams[3],functionParams[4]);
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates a random String with the given length. Is needed to generate the Author Ids
|
* Generates a random String with the given length. Is needed to generate the Author Ids
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue