Implemented the the new API method getPadID for reversing the Readonly ID. Based on: ff88c19fc1
This commit is contained in:
parent
493636ec36
commit
fffdde0c59
|
@ -640,6 +640,32 @@ exports.getReadOnlyID = function(padID, callback)
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
getPadID(roID) returns the padID of a pad based on the readonlyID(roID)
|
||||
|
||||
Example returns:
|
||||
|
||||
{code: 0, message:"ok", data: null}
|
||||
{code: 1, message:"padID does not exist", data: null}
|
||||
*/
|
||||
exports.getPadID = function(roID, callback)
|
||||
{
|
||||
//get the PadId
|
||||
readOnlyManager.getPadId(roID, function(err, padID)
|
||||
{
|
||||
if(ERR(err, callback)) return;
|
||||
|
||||
if(padID == null)
|
||||
{
|
||||
callback(new customError("padID does not exist","apierror"));
|
||||
}
|
||||
else
|
||||
{
|
||||
callback(null, {PadID: padID});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
setPublicStatus(padID, publicStatus) sets a boolean for the public status of a pad
|
||||
|
||||
|
|
Loading…
Reference in New Issue