Commit Graph

71 Commits

Author SHA1 Message Date
46682ed7da api: use int on defined pager methods 2023-03-22 07:24:37 +00:00
aa3e60d188 backend: make SeaweedFS::Client::url_for accept a scalar too 2023-03-21 21:43:42 +00:00
396ab297a8 all: prefer postfix dereference syntax 2023-03-21 21:43:36 +00:00
56ee34eb7c api: partially revert 5ce96a0087 2023-03-20 20:49:16 +00:00
653440b192 backend: add tag links in media#show 2023-03-17 21:03:49 +00:00
58989f2c53 api: add tag pager to /media/:media_id 2023-03-17 20:59:34 +00:00
171c6ee8cd backend: link to /media/:media_id instead of raw image 2023-03-17 20:57:08 +00:00
84cbc5dd30 backend: use named routes in url_for 2023-03-17 20:52:49 +00:00
5ce96a0087 api: move Random controller into Tags and Media 2023-03-17 20:33:44 +00:00
fc32afcb79 api, backend: name routes 2023-03-17 20:08:08 +00:00
71d31e625a backend: merge Gallery controller into Media 2023-03-17 20:01:28 +00:00
72412a7889 backend: implement /media/:media_id 2023-03-17 19:58:12 +00:00
aa5e4ffe29 api: return tags for /media/:media_id 2023-03-17 19:58:12 +00:00
37a2806f03 api, backend: improve references uses 2023-03-15 22:41:45 +00:00
672192441d backend: reorder title setting and set title for tags#show 2023-03-15 20:49:01 +00:00
95beb0a599 api: make _pager a helper 2023-03-10 20:41:52 +00:00
fa07cf5645 backend: implement paging 2023-03-10 20:34:00 +00:00
79a9173574 api: change the pager output 2023-03-09 21:14:44 +00:00
1ea50ed54f backend: fix API /media call 2023-03-09 20:57:01 +00:00
02c7c3c0db backend: implement /tags and /tag/:tag_id_or_name 2023-03-08 20:44:54 +00:00
ff017f924b all: make seaweedfs_fid a string again 2023-03-08 20:44:54 +00:00
ba099af452 api: use tagged_media_view instead of media_tag 2023-03-08 20:44:27 +00:00
555a0bc1d1 db: add tagged_media_view 2023-03-08 20:43:56 +00:00
b1f2e533c1 api: make /tag/:tag_id_or_name return more than media_id 2023-03-05 21:08:13 +00:00
def852261f api: remove not implemented methods from /meta 2023-03-05 20:53:53 +00:00
af536b9cf6 api: make /media parse seaweedfs_fid 2023-03-05 20:43:20 +00:00
70191db656 Rename PoorBooru => PoorBooru::Backend 2023-03-05 20:03:20 +00:00
6dfabdf29f backend: add / 2023-03-05 17:23:13 +00:00
302ec269d5 Add a barebones SeaweedFS client library 2023-03-05 17:23:13 +00:00
c9ffa62be8 api: quiet a warning about tag_id not being numeric
Only add one of tag_id or name to the search query, depending on whether
tag_id_or_name is numeric or not.

While at it, replace a {} with undef in search().
2023-03-05 17:23:13 +00:00
04580aca72 api: add /random/media 2023-03-05 17:23:13 +00:00
0c4ab53586 api: add /media and /media/:media_id 2023-03-05 17:23:13 +00:00
8655e5fa04 db: use a binary seaweedfs_fid 2023-03-05 17:23:13 +00:00
6ecf98f917 api: add /random/tag 2023-03-04 21:58:18 +00:00
7ccbc3af12 api: initial migration 2023-03-04 21:58:18 +00:00
13a6d287af db: rework schema and infrastructure 2023-03-04 21:31:42 +00:00
fbcaea8bfc Remove Dancer2 files 2023-03-04 21:31:42 +00:00
ff22b71fa1 backend: use tag name instead of ID 2023-02-22 21:10:01 +00:00
5a0b18feb8 Replace some concatenations with interpolation 2023-02-21 19:55:12 +00:00
91d73cd314 backend: implement /random/media and /random/tag 2023-02-21 19:55:12 +00:00
88b5354529 api: rename /random -> /random/media and implement /random/tag 2023-02-21 19:30:23 +00:00
ad6a6cb9c0 backend: implement /random 2023-02-19 20:22:30 +00:00
c55bdd6ea7 backend: rename /view -> /media 2023-02-19 20:22:29 +00:00
b09a5e7fe1 backend: add partial support for viewing media 2023-02-19 20:22:29 +00:00
82aeb0c536 backend: handle paged /tag/:tag_id_or_name from API 2023-02-19 18:17:59 +00:00
065d5a9d88 api, backend: whitespace and declarations shuffling 2023-02-19 18:14:04 +00:00
06a939bcd1 api, backend: improve validations
Introduce a sub for validating page number.

Introduce a sub for validating tag name and allow non-ASCII characters.
2023-02-19 18:09:44 +00:00
3011d47ec8 api: fix VERSION 2023-02-19 17:56:10 +00:00
978f979d4d api: rewrite /tag/:tag_id_or_name
Commit 3a41ea6d0b allows for using a
SELECT WHERE ... OR ... instead of two SELECT WHERE.

Page the media results.
2023-02-19 16:17:39 +00:00
a0d3601c57 backend: refactor communication with api 2023-02-19 15:50:06 +00:00