mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-12 22:26:08 -04:00
Change note action "share" to "publish" to avoid misleading
This commit is contained in:
parent
85c67212ad
commit
04eef71b11
4 changed files with 16 additions and 16 deletions
|
@ -33,9 +33,9 @@ var response = {
|
|||
newNote: newNote,
|
||||
showFeatures: showFeatures,
|
||||
showNote: showNote,
|
||||
showShareNote: showShareNote,
|
||||
showPublishNote: showPublishNote,
|
||||
noteActions: noteActions,
|
||||
shareNoteActions: shareNoteActions
|
||||
publishNoteActions: publishNoteActions
|
||||
};
|
||||
|
||||
function responseError(res, code, detail, msg) {
|
||||
|
@ -139,7 +139,7 @@ function showNote(req, res, next) {
|
|||
responseHackMD(res, noteId);
|
||||
}
|
||||
|
||||
function showShareNote(req, res, next) {
|
||||
function showPublishNote(req, res, next) {
|
||||
var shortid = req.params.shortid;
|
||||
if (shortId.isValid(shortid)) {
|
||||
Note.findNote(shortid, function (err, note) {
|
||||
|
@ -194,7 +194,7 @@ function showShareNote(req, res, next) {
|
|||
}
|
||||
}
|
||||
|
||||
function actionShare(req, res, noteId) {
|
||||
function actionPublish(req, res, noteId) {
|
||||
db.readFromDB(noteId, function (err, data) {
|
||||
if (err) {
|
||||
responseError(res, "404", "Not Found", "oops.");
|
||||
|
@ -307,9 +307,9 @@ function noteActions(req, res, next) {
|
|||
}
|
||||
var action = req.params.action;
|
||||
switch (action) {
|
||||
case "share":
|
||||
case "publish":
|
||||
case "pretty": //pretty deprecated
|
||||
actionShare(req, res, noteId);
|
||||
actionPublish(req, res, noteId);
|
||||
break;
|
||||
case "download":
|
||||
actionDownload(req, res, noteId);
|
||||
|
@ -326,7 +326,7 @@ function noteActions(req, res, next) {
|
|||
}
|
||||
}
|
||||
|
||||
function shareNoteActions(req, res, next) {
|
||||
function publishNoteActions(req, res, next) {
|
||||
var action = req.params.action;
|
||||
switch (action) {
|
||||
case "edit":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue