Commit graph

58 commits

Author SHA1 Message Date
nicksherron 88c2c27807 fix tests for merged #18 2021-01-07 13:56:11 -05:00
Petr Hejl 7e40b83069 Fix test build 2021-01-04 15:36:35 +01:00
Petr Hejl 4abbd5978e Allow disabling user registrations 2021-01-04 14:43:19 +01:00
nicksherron 3c02bb5e70 internal/server: comment refactoring 2020-02-21 00:07:56 -05:00
nicksherron bc3a02bd06 internal/server: fix null search response error
A command search with 0 results would return null and cause the client to throw an error because of invalid json.
For example, "bh 'some non-existent-command'" would respond with
"Sorry, an error occurred communicating with Bashhub. Response Code: 200"
A zero result response now returns {} which the bashhub-client doesn't complain about.
2020-02-19 14:48:27 -05:00
nicksherron 276abf37b0 Revert "internal/db: #9 add case insensitive search"
This reverts commit eeb43dfb. While this change did successfully allow case insensitive searching, it also made regex matching of upper case letters not possible such as '^[A-Z]+$'.
This would have defeated the purpose of having regex in the first place so only an implementation of case insensitive searching that doesn't sacrifice regex functionality should be added.
2020-02-19 13:01:34 -05:00
nicksherron eeb43dfbbe internal/db: #9 add case insensitive search 2020-02-19 12:32:10 -05:00
nicksherron bfc9179729 cmd/transfer,cmd/server: make SessionID pointer so sql null doesn't panic and improve transfer performance 2020-02-17 07:00:20 -05:00
nicksherron 67cc6016ea cmd,internal: add tests, remove unnecessary exports, transfer password prompt 2020-02-16 12:35:28 -05:00
nicksherron 27c57b37a9 server_test: status added; db: query refactor 2020-02-14 15:23:36 -05:00
nicksherron 629475e08f added server_test helpers 2020-02-14 12:43:54 -05:00
nicksherron 8ee357e2e7 test/server_test: addes postgres tests 2020-02-14 08:53:40 -05:00
nicksherron ce4313b18e test/server_test: first tests 2020-02-14 04:21:34 -05:00
nicksherron 3d026eb239 internal/db: systemUpdate query fix 2020-02-11 23:09:36 -05:00
nicksherron 997806afc9 internal/db: use local time 2020-02-11 22:28:20 -05:00
nicksherron a606897f71 added system patch endpoint and cmd/transfer: passes http.client to goroutines 2020-02-11 22:13:37 -05:00
nicksherron 980a975b63 internal/server and internal/db: if query fails return status with error 2020-02-11 20:27:43 -05:00
nicksherron 1bcb4147fa internal/server: store user_id in jwt token 2020-02-11 20:22:42 -05:00
nicksherron 7fbf6026a4 merge feature-bhdownload 2020-02-11 19:57:13 -05:00
nicksherron 9f5b50eb87 merge feature-bhdownload 2020-02-11 19:39:33 -05:00
nicksherron 58c935f910 internal/db: import query fix 2020-02-11 18:34:13 -05:00
nicksherron 6c2d854ee2 internal/db: reformat sql queries 2020-02-11 16:39:48 -05:00
nicksherron 4ce3705242 jwt secret refactor 2020-02-11 04:18:07 -05:00
nicksherron 21537c1d0b jwt secret refactor 2020-02-11 04:07:59 -05:00
nicksherron e01de338d8 working poc 2020-02-11 03:15:13 -05:00
nicksherron 88d920cd35 working poc 2020-02-11 01:30:34 -05:00
nicksherron af61b5d388 requests working but query needs fixed 2020-02-11 00:15:11 -05:00
nicksherron 21351444c8 internal/db: don't filter bh commands 2020-02-10 17:36:08 -05:00
nicksherron ae839c1ec4 status endpoint added 2020-02-10 17:05:55 -05:00
nicksherron 3f1fbb4294 delete command added 2020-02-10 14:16:29 -05:00
nicksherron 2e393c97e0 filter non exit status 0 and 130 commands from command insert rather than handling in command query 2020-02-10 14:04:05 -05:00
nicksherron 872bacdcee README update for go install option 2020-02-10 10:32:17 -05:00
nicksherron 73fb0c4a04 second release 2020-02-10 03:33:30 -05:00
nicksherron c4b523e12e second release 2020-02-10 03:30:17 -05:00
nicksherron 587b6eecf3 second release 2020-02-10 03:07:40 -05:00
nicksherron d9c3ab243f gofmt 2020-02-10 01:54:50 -05:00
nicksherron 7b16271dbe commenting exported vars/funcs and blank imports 2020-02-10 01:53:37 -05:00
nicksherron daa9349100 internal/db: unexport db var and dbInit; cmd/root: startup message; internal/server: custom log 2020-02-10 00:39:57 -05:00
nicksherron 0c913d8215 internal/server: struct refactoring 2020-02-09 22:45:20 -05:00
nicksherron 1b78ce5746 internal/db: password has in userCreate method rather than route call 2020-02-09 19:50:19 -05:00
nicksherron 5553605bb1 index update 2020-02-09 19:45:51 -05:00
nicksherron e942e2331e get command by uuid 2020-02-09 19:38:17 -05:00
nicksherron 51dfeb11b3 get command by uuid 2020-02-09 19:36:23 -05:00
nicksherron 7930a9bf8c get command by uuid 2020-02-09 19:34:16 -05:00
nicksherron 0cc8b84cc4 get command by uuid 2020-02-09 19:30:26 -05:00
nicksherron 9d2d414bee system query added 2020-02-09 18:47:18 -05:00
nicksherron 897f9035e2 jwt working 2020-02-09 18:30:05 -05:00
nicksherron 8de46366c6 internal/db: queries all seem to be working for both sqlite3 and postgres 2020-02-09 14:26:06 -05:00
nicksherron e31eb9af52 exclude bh from command query 2020-02-08 22:01:42 -05:00
nicksherron 5890dd419f query only returns commands with exit status 0 or 130 2020-02-08 21:41:12 -05:00