ok-borg / borg

Search and save shell snippets without leaving your terminal
Apache License 2.0
1.61k stars 58 forks source link

Crud snippets #17

Closed jeremyletang closed 7 years ago

jeremyletang commented 7 years ago

Here is a wip of the snippet crud implementation. It's not finished/ready for merge I just hack few moment on it. I just want to be sure we agree about the way it's implemented for now.

I use only elastic search to store the snippets, but we may want in the future use a relational database to store snippets then feed elasticsearch with the database.

Just wanted to know your though about this for now.

crufter commented 7 years ago

Nice! One thing tho: we should reuse the same type what we have in the database (named problem, but open to suggestions) now. I made an edit view on the web UI: it's extremely crufty: one can edit the problem title and all the solutions in the same go.

Deleting a solution will work by sending an empty string in a textarea, a new solution can be sent by sending a non empty string in the last textarea. It's not too pretty but the best we can do without the solutions themselves having unique ids - which requires a db update etc :))

Once CRUD works we can think about making things prettier - I just want to get there asap and give the command line client support for saving things cause it would make my life tons better :D

crufter commented 7 years ago

Awesome. Will clean & debug and merge. Cheers, @jeremyletang