summaryrefslogtreecommitdiff
path: root/lib/web/note (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-03-29Add better logging messagesErik Michelson1-2/+2
Signed-off-by: Erik Michelson <opensource@erik.michelson.eu>
2021-03-29Check for existing notes on POST and dont override themErik Michelson1-1/+14
Previously one could override notes in FreeURL-mode by sending multiple POST requests to the /new/<alias> endpoint. This commit adds a check for an already existing note with the requested alias and returns a HTTP 409 Conflict error in case that happens. Signed-off-by: Erik Michelson <opensource@erik.michelson.eu>
2021-02-17Add HTTP 404 error on non-existent note downloadsErik Michelson2-3/+6
When FreeURL mode is enabled and you called the /download route, the note was created and the user redirected to the blank note. This is caused because the findNote method automatically creates a note when no existing one is found. This commit adds a new parameter to the findNote method which allows to disable this behaviour. In that case a HTTP 404 error will be returned. Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2021-01-22Add config option which requires authentication in FreeURL modeNicolas Dietrich1-1/+1
This mitigates unintended note creation by bots or humans through a simple GET call. See discussion in #754. Signed-off-by: Nicolas Dietrich <nidi@mailbox.org>
2021-01-22Minor refactoring of freeURL condition checkNicolas Dietrich1-4/+6
Signed-off-by: Nicolas Dietrich <nidi@mailbox.org>
2020-11-26Remove pdf export codeTilman Vatteroth2-41/+0
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-11-14Replace CodiMD with HedgeDocErik Michelson1-1/+1
Signed-off-by: Erik Michelson <github@erik.michelson.eu> Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: References in public/views Signed-off-by: David Mehren <git@herrmehren.de> Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: Update links in README Signed-off-by: David Mehren <git@herrmehren.de> Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: Update links in SECURITY.md Signed-off-by: David Mehren <git@herrmehren.de> Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: Update links in LICENSE Signed-off-by: David Mehren <git@herrmehren.de> Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: Update links in docs/configuration.md Signed-off-by: David Mehren <git@herrmehren.de> Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: Update links in bin/setup Signed-off-by: David Mehren <git@herrmehren.de> Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: References in docs/guides Signed-off-by: David Mehren <git@herrmehren.de> Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: References in docs/dev Signed-off-by: David Mehren <git@herrmehren.de> Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: References in docs/guides/auth Signed-off-by: David Mehren <git@herrmehren.de> Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: References in docs/setup Signed-off-by: David Mehren <git@herrmehren.de> Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: Update various links in code to the new GitHub org. Signed-off-by: David Mehren <git@herrmehren.de> Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: codiMDVersion.js is now hedgeDocVersion.js Signed-off-by: David Mehren <git@herrmehren.de> Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: References in docs/setup/yunohost Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rebrand to HedgeDoc: Add banner and logo Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: Update links in docs/guides/migrate-etherpad Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: Remove note in docs/guides/auth/github Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: Replace links in public/docs/features Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: Add todo placeholder in docs/history Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: Replace github link in public/views/index/body Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: Replace github link in README Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: Add logo to README Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Rename to HedgeDoc: Add note about the renaming to the front page Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Removed Travis from README.md and change CodiMD to HedgeDoc in some places Signed-off-by: Yannick Bungers <git@innay.de> Some more renaming to HedgeDoc - Fixed capitalization of HedgeDoc - Added renaming for etherpad migration doc Signed-off-by: Yannick Bungers <git@innay.de> Changed Repo name to hedgedoc Signed-off-by: Yannick Bungers <git@innay.de>
2020-11-11Save note title to database when creating a noteDavid Mehren1-1/+2
Currently, when creating a note with content via the API, a title is only saved to the database after visiting the note with the browser. This commit makes sure that a title is saved at creation time. Closes #306 Signed-off-by: David Mehren <git@herrmehren.de>
2020-07-04Fixed meta parsing of lang-attribute for using it in the published-viewErik Michelson1-1/+1
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2020-07-03Added dynamic lang-attr to pretty.ejsErik Michelson1-0/+1
CodiMD currently only uses the 'lang' attribute in YAML-metadata of a note for setting certain js-elements of the markdown-renderer. This commit adds the chosen lang into the published version of a note. Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2020-04-28findNoteOrCreate: Create new note with empty string instead of `null`Sandro1-1/+1
Backport of #345 to 1.x Signed-off-by: Sandro Jäckel <sandro.jaeckel@gmail.com>
2020-03-21Backport Fix for relative theme pathSheogorath1-1/+1
This commit backport 856fc01fb9b30489b254f2ef9d29de80aa189118 Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2019-10-27Inline renderPublishSlideDavid Mehren1-8/+4
Signed-off-by: David Mehren <dmehren1@gmail.com>
2019-10-27Inline responseCodiMDDavid Mehren1-18/+14
Signed-off-by: David Mehren <dmehren1@gmail.com>
2019-10-27Inline publish and slideDavid Mehren1-10/+2
Signed-off-by: David Mehren <dmehren1@gmail.com>
2019-10-27Inline renderPublishDavid Mehren1-8/+4
Signed-off-by: David Mehren <dmehren1@gmail.com>
2019-10-27Move showPublishNote and publishNoteActions to note controllerDavid Mehren5-43/+99
Signed-off-by: David Mehren <dmehren1@gmail.com>
2019-10-27Move showNote to note controllerDavid Mehren2-105/+19
Signed-off-by: David Mehren <dmehren1@gmail.com>
2019-10-27Move note actions into their own fileDavid Mehren2-9/+131
Signed-off-by: David Mehren <dmehren1@gmail.com>
2019-10-27Rename actions.js to controller.js and rename functions to be more descriptiveDavid Mehren2-20/+31
Move postNote to NoteController and rename to createFromPost Signed-off-by: David Mehren <dmehren1@gmail.com>
2019-10-27Move slide actions to own fileDavid Mehren2-2/+86
Signed-off-by: David Mehren <dmehren1@gmail.com>
2019-10-27Fix errors constant in note/actions.jsDavid Mehren1-7/+7
Signed-off-by: David Mehren <dmehren1@gmail.com>
2019-10-27Move note actions to their own file.David Mehren3-0/+286
Because of circular import problems, this commit also moves the error messages from response.js to errors.js Signed-off-by: David Mehren <dmehren1@gmail.com>