memos/server/router/api/v1
andrigamerita e4a09c407c
feat: write memo visibility in file names when exporting (#3538)
When using the dedicated feature in Memos' user settings to export all memos to Markdown files inside a ZIP folder, the output doesn't feature any kind of distinction for memos by their set visibility.
While this is not a big issue for personal backups, it can reveal itself problematic if exporting the data to share it with other people, or maybe deploy to a static site generator, because there is nothing in the files that distinguishes public memos from private or workspace-restricted ones.

This pull request simply modifies the ExportMemos server function, to add the Visibility status to the end of every exported file name inside the ZIP, right after the date (which is left intact). For example, the file for a public memo would now be called: `YYYY-MM-DDThh:mm:ss+hh:mm-PUBLIC.md`.

An alternative solution would have been to write this information in a YAML header at the beginning of every Markdown file, but, since those are not used anywhere else in the software, I decided to stick with what is already used for export metadata, the filename.
2024-06-09 19:22:13 +08:00
..
acl.go chore: remove access token after sign out 2024-05-20 08:53:29 +08:00
acl_config.go chore: update tags filter 2024-05-14 08:12:25 +08:00
activity_service.go chore: rename router package 2024-05-01 10:28:32 +08:00
auth.go chore: rename router package 2024-05-01 10:28:32 +08:00
auth_service.go chore: tweak common function 2024-05-26 11:02:23 +08:00
common.go chore: tweak common function 2024-05-26 11:02:23 +08:00
idp_service.go chore: tweak common function 2024-05-26 11:02:23 +08:00
inbox_service.go chore: tweak common function 2024-05-26 11:02:23 +08:00
logger_interceptor.go chore: rename router package 2024-05-01 10:28:32 +08:00
markdown_service.go chore: update gomark source 2024-06-06 23:09:13 +08:00
memo_relation_service.go chore: rename router package 2024-05-01 10:28:32 +08:00
memo_resource_service.go chore: handle legacy workspace setting 2024-05-07 22:07:44 +08:00
memo_service.go feat: write memo visibility in file names when exporting (#3538) 2024-06-09 19:22:13 +08:00
reaction_service.go chore: tweak common function 2024-05-26 11:02:23 +08:00
resource_name.go chore: rename router package 2024-05-01 10:28:32 +08:00
resource_service.go chore: tweak common function 2024-05-26 11:02:23 +08:00
user_service.go chore: tweak common function 2024-05-26 11:02:23 +08:00
v1.go chore: fix linter 2024-05-21 00:08:57 +08:00
webhook_service.go feat: update webhook request payload 2024-06-05 20:53:20 +08:00
workspace_service.go feat: add HasIncompleteTasks to memo property 2024-06-05 08:39:56 +08:00
workspace_setting_service.go chore: update memo related settings 2024-06-01 09:05:09 +08:00