mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-15 03:26:53 -04:00
Add API endpoint to return padID for a readOnlyID
This commit is contained in:
parent
97402f60b8
commit
ff88c19fc1
1 changed files with 18 additions and 0 deletions
|
@ -460,6 +460,24 @@ exports.getReadOnlyID = function(padID, callback)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
getPadID(readonlyID) returns the normal link of a pad
|
||||||
|
|
||||||
|
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;
|
||||||
|
callback(null, {PadID: PadId});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
setPublicStatus(padID, publicStatus) sets a boolean for the public status of a pad
|
setPublicStatus(padID, publicStatus) sets a boolean for the public status of a pad
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue