Commit Graph
89 Commits
Author SHA1 Message Date
Umputun 7d01165d1e overwrite default "token" for auth ta avoid conflict with deleteme #324 2019-05-12 21:24:59 -05:00
UmputunandGitHub 4adbca22b2 Refactor rest (#320)
* fresh vendor

* enforce vendor flag with env

* move tree to service package

* move controllers routing to rest.go, remove separate subrouters

* cleanup/formatting

* missing vendor packages

* move rss, img proxy, robots and getstarted to top-level routes

* simplify logger middleware usage

* randomize server test ports

* check for non-admin in admin tests

* lint: minor warns

* admin test to jwt admin
2019-05-07 01:54:19 -05:00
Umputun cc49ee0946 fix uninitialized imageapi pattern string 2019-05-04 12:10:39 -05:00
UmputunandGitHub 68b892f5e9 Image resize (#311)
* resize uploaded images #309

* fix temp files created in current dire after image test

* update mod

* missing image test files

* fix failed goroutine test on image-resize submit

* switch to mockery

* missing in mock change

* resize by both ResizeWidth and ResizeHeight

* add IMAGE_RESIZE params to readme

* add latest features to the description

* lint: missing file close in image test
2019-04-17 02:53:35 -05:00
Umputun 3d61be8c44 make AuthHooks test faster 2019-04-12 10:14:17 -05:00
Umputun 0f433722da disable picture upload for anonymous 2019-04-04 01:53:47 -05:00
Umputun bba958a813 Merge remote-tracking branch 'remotes/origin/master' into image 2019-03-24 16:27:20 -05:00
Umputun db3f22d9fd change image submit to single goroutine with active wait. flush all submitted on close 2019-03-23 19:13:58 -05:00
Umputun 58ec50e613 wire image submit to store.Service 2019-03-23 18:33:19 -05:00
Umputun c990b05c21 add image service with delayed commit. Move cleanup loop to service 2019-03-23 14:54:45 -05:00
Umputun b49e242891 wire image staging and image cleanup 2019-03-23 03:06:24 -05:00
Umputun bc714480d4 lint: multiple shadowed errors, missed comments for exported methods 2019-03-19 20:54:05 -05:00
Umputun 83de28c2da strip trailing / from REMARK_URL
https://github.com/umputun/remark/issues/289#issuecomment-474030504
2019-03-18 13:04:21 -05:00
Umputun 0aba6a5653 longer test time for server app 2019-03-11 14:23:12 -05:00
Umputun 58eb4e8852 typos 2019-03-11 14:09:05 -05:00
Umputun 639f6c15f3 wire image save/load to rest and cmd 2019-03-11 01:16:25 -05:00
Umputun 1561dc2fda switch to go mod 2019-03-09 02:02:55 -06:00
Umputun 0c950ae4f7 add anon option and direct provider #279 2019-02-19 13:59:43 -06:00
Umputun 0fe3f6dd7d fix bad default for restricted words 2019-02-02 13:38:40 -06:00
Umputun 3471c5dab8 add missing params to readme 2019-01-27 16:21:05 -06:00
Umputun cb5fc79dbe add site-level positve score support #260 2019-01-26 01:38:56 -06:00
Aleksandr MelnikovandUmputun ab6c9a515c Support restricted words (#257)
* prepared interfaces and naive implementation for restricted words

* fixed whitespace tokenizer last token handling

* removed unnecessary check in whitespace tokenizer last token handling

* removed unnecessary interfaces, added matcher to service

* now using more explicit naming

* added config parameter/env variable to configure restricted words
provided simple matcher and lister implementation into service

* fixed linter warnings

* fixed linter warnings (part 2)

* added functional tests for rest api
moved check for restricted words into validation stage

* fixed missing error check in rest private test

* fixed failed test that expected validation in specific order

* fixed linter warning

* removed unnecessary 'else'

* removed redundant check from 'DataStore.EditComment'

* replaced exact matching for restricted words with wildcard matching

* fixed race condition when creating wildcardTrie
removed unnecessary wildcard masks
refactored tests in a table format

* improved documentation for restricted words param

* removed wildcardTrie caching as a premature optimization
removed unnecessary validation method ValidateCommentText
moved restricted words validation into service methods that create and update comment

* fixed error name due to linter warning
2019-01-21 16:48:35 -06:00
Umputun 62b54eb009 resort imports 2019-01-17 18:50:02 -06:00
Umputun 2a3051c620 allow separate limiter for updates and posts, agressive default limit 2019-01-17 14:56:11 -06:00
Umputun f7403f08b9 inject refresh cache to auth, revendor go-pkgz/auth to 0.4 2019-01-17 13:17:16 -06:00
Umputun 367c3d0cc2 blocked users returns 401 2019-01-15 13:17:59 -06:00
Umputun 781d90e98b switch to lgr 2019-01-07 22:32:50 -06:00
Umputun 3472475a82 add rest and batch (cleanup --title) support for title's #241 2019-01-06 14:52:43 -06:00
Umputun 0fd8657992 make title extractor optional 2019-01-05 13:22:28 -06:00
Umputun 7b54b00c01 switched to auth 0.3 2019-01-04 18:09:18 -06:00
Umputun a6d20b1563 lint: missing error check in tests 2019-01-02 11:50:36 -06:00
Umputun ca1943f909 revendor with auth:0.1.1 2018-12-31 17:47:25 -06:00
Umputun 7deee9aaa1 revendor with lateas auth lib, sets logger to stdout 2018-12-30 23:06:20 -06:00
Umputun 80467c39af switch utils commands to basic auth, remove secret passing 2018-12-30 18:00:32 -06:00
Umputun 55cae69d49 add test triggeting auth hooks 2018-12-30 16:17:00 -06:00
Umputun 195e65ca60 adjusted tests for new auth lib 2018-12-30 13:31:03 -06:00
Umputun acf19e73cf minor formatting 2018-12-29 18:36:34 -06:00
Umputun d33997c742 pass auth by reference 2018-12-28 00:49:46 -06:00
Umputun 60700d96c7 isolate authenticator creation to a separate methos 2018-12-28 00:37:02 -06:00
Umputun 09de97ffd6 resort imports 2018-12-28 00:02:35 -06:00
Umputun 085468e788 missing remark url in auth init 2018-12-27 23:49:06 -06:00
Umputun c4b10a395a most test passes with ext auth 2018-12-27 23:11:20 -06:00
UmputunandGitHub 2fc027299f Merge branch 'master' into migrator-meta 2018-12-24 00:35:09 -06:00
Umputun b8ed722b2e increase wrtie timeout to allow long exports 2018-12-24 00:19:12 -06:00
Umputun 094f4c66a1 replace confusing name for native import/export provider 2018-12-21 20:01:03 -06:00
Umputun 10f21f78f0 basic test for Metas service 2018-12-20 02:49:56 -06:00
UmputunandGitHub 2ecc08fb3e Ext cache (#236)
* remove  cache, switch to go-pkgz/rest/cache

* remove mongo cache from server test

* remove old caching code

* test tricky disqus inputs

* fix migrator test

* stacktrace dump test
2018-12-19 21:57:33 -06:00
Umputun 908eb9b631 lint: shadow err and defes on close with no err check 2018-12-18 22:24:20 -06:00
Umputun 96ddeaefc8 wrong mux gorilla deps 2018-12-18 22:15:17 -06:00
Umputun 998b390ec2 move constants up, add comments 2018-12-18 22:02:52 -06:00