Commit graph

14 commits

Author SHA1 Message Date
Matt Baer
a0b313d5db Add writefreely --dump flag
This dumps all database data in SQL format. Currently only support
MySQL.

TODO: clean up logging information that also comes out with the data
dump
2020-02-24 15:21:41 -05:00
Rob Loranger
41166e5c35
CLI delete account by username and delete posts
this changed the CLI flag to use the username instead of the userID
leaving the underlying database function as is.

also now posts are all deleted with no option to skip as this is likely
never needed.
2019-11-05 09:14:20 -08:00
Rob Loranger
c87ca11a52
add account deletion
CLI only but backend supports calls from app.db.DeleteAccount already

takes --delete-account user_id_number with optional --posts to also
delete posts. if --posts is omitted all user posts will be updated to
anonymous posts
2019-10-31 15:20:18 -07:00
Daniel Watkins
7a53af355e
Emit the server software and version to the log on startup 2019-08-11 09:53:33 -04:00
Matt Baer
a740c67495 Fix whitespace
This runs `go fmt` on changed files and moves around some blank lines.
2019-07-01 13:33:26 -04:00
Michael Demetriou
6506709fbc Merge branch 'develop' into shorter-config-process
Move flag parsing to main.go as per the issue description
2019-06-21 12:07:01 +03:00
Matt Baer
26a0990014 Save config via Apper interface from Admin dash
Ref T613
2019-06-13 21:56:13 -04:00
Matt Baer
034db22f8c Break functionality out of Serve() func
- Adds a new interface, Apper, that enables loading and persisting
  instance-level data in new ways
- Converts some initialization funcs to methods
- Exports funcs and methods needed for intialization
- In general, moves a ton of stuff around

Overall, this should maintain all existing functionality, but with the
ability to now better manage a WF instance.

Ref T613
2019-06-13 18:50:23 -04:00
Matt Baer
77c8152786 Break up CreateUser credentials into two args
Now the func takes a username and password instead of a single string.
2019-05-12 18:42:57 -04:00
Matt Baer
9023d4eb3f Move flag parsing to main package
This exposes setup and admin functions in the writefreely package, and
uses them in the main application, initialized by the flag parsing that
now happens there.

This is the first step towards making `writefreely` usable as a
standalone package.
2019-05-10 11:40:35 -04:00
Matt Baer
3ae45bc156 Fix spacing around copyright notices 2018-12-31 01:05:26 -05:00
Matt Baer
1274914207 Add copyright / license notices to .go files 2018-12-24 12:45:15 -05:00
Matt Baer
64e52ba00d Add make release 2018-11-18 22:29:35 -05:00
Matt Baer
16473c97b7 Create basic server
Includes app config and some initialization
2018-10-15 14:44:15 -04:00