rr-
141c9fcdc9
server/tags: merge also tag relations
2016-10-22 18:02:50 +02:00
rr-
995cd4610d
server: drop old style class declarations
2016-10-22 14:43:52 +02:00
rr-
e71718c50d
server/posts: add replaceContent to post merging
2016-10-21 22:34:45 +02:00
rr-
9d6a0e0173
server/posts: add post merging
2016-10-21 21:48:38 +02:00
rr-
b853caf6f5
server/posts: fix relation updating
...
Fixes #103
2016-10-02 17:21:15 +02:00
rr-
b0c5031001
client+server/posts: reverse next/prev post role
...
In the post list, when we navigate to the page with ">" button, we
navigate to older posts.
In the post view, when we navigate to the page with ">" button, we
navigate to older posts as well.
However, in the post list, the ">" button is called "next page".
At the same time, in the post view, the ">" button was called "previous
post". Now it's called "next post".
The difference isn't visible to normal users nor even API consumers as
the "get posts around post X" request isn't documented.
The change is motivated not only by consistency, but to also improve
compatibility with Vimperator's `[[` and `]]`. Vimperator assumes the
word "next" refers to ">" and the word "previous" refers to "<".
2016-10-02 17:07:08 +02:00
rr-
049a0dc351
server/mime: fix GIF animation heuristics
...
Closes #100
2016-09-29 12:59:40 +02:00
rr-
e8c93cd735
server: fix constructing of HTTP errors
...
When I added error codes, I missed these exceptions.
2016-09-26 22:51:07 +02:00
rr-
0c61e85340
server: fix lint
2016-09-26 22:51:00 +02:00
rr-
560a7d6839
server/search: prefer arrays over ranges
...
(No, it doesn't work recursively.)
Also fix tests.
2016-09-26 22:48:09 +02:00
rr-
1e65622daf
server/search: don't be a hardass about strings
...
Let range criteria (values that contain ..) that end up being used as
strings, to be used as if they were simple criteria. So let the user
search for "when_you_see_it..." and don't throw a warning.
2016-09-26 22:48:09 +02:00
rr-
1bd8af47b0
server/search: match only [a-z-]* for named tokens
...
Adds ability to search for *:* for example. Still not perfect, but it's
a start.
2016-09-26 22:06:18 +02:00
rr-
0e31e1fd14
server/search: fix underscores and percentages
...
Escape them for LIKE statements.
2016-09-26 21:58:27 +02:00
rr-
71a4ce8764
server/func: handle download errors
2016-09-25 14:52:47 +02:00
rr-
d1cad99e87
server/middleware: fix reporting auth errors
2016-09-24 08:38:15 +02:00
rr-
42b7a9b94f
server/errors: fix serializing errors
2016-09-10 15:28:32 +02:00
rr-
16d04adde0
server/errors: add and document error codes
2016-09-10 11:36:01 +02:00
rr-
8674c8b50e
server/posts: report duplicate post ID and URL
2016-09-10 10:16:14 +02:00
rr-
0a19e7bbd0
server/errors: allow extra info in errors
2016-09-10 10:16:14 +02:00
rr-
c516030c66
server/tests: fix info api tests
2016-09-10 10:12:43 +02:00
rr-
7fa8593b0a
client/general: improve URL escaping
...
Specifically, cater for /, + and % in URL components.
2016-09-04 02:07:22 +02:00
rr-
a22fe306d1
server/posts: fix deleting posts with relations
2016-08-31 22:49:45 +02:00
rr-
eff0e002f2
server/info: increase hdd usage cache time to 48h
2016-08-31 22:22:06 +02:00
rr-
243ab15b85
server/tags: add order to tag names
...
The better implementation of a224297
.
Fixes ability to reorder tag aliases, especially - the ability to change
the tag's primary name after it was created. Until now, both of these
scenarios needed sad workarounds on the user part.
2016-08-28 20:00:50 +02:00
rr-
c366b608da
server/search: fix negating complex searches
...
Entering:
miko -miko
is a contradiction that shouldn't have been returning any matches, but
it has nonetheless. This change fixes the construction of negated
expressions that use subqueries.
2016-08-28 18:43:05 +02:00
rr-
3c5878cb16
server/tags: improve tag list performance
2016-08-27 22:19:01 +02:00
rr-
ef0f74297f
server/tag-categories: fix default categories
...
- Don't cache default category in its entirety - cache only its name
- Purge cache on category name changes and default category changes
- Lock records for updates where applicable
2016-08-27 12:39:59 +02:00
rr-
06ab98fa70
server/search: fix sort:random breaking tags
...
Using sqlalchemy's subqueryload to fetch tags works like this:
1. Get basic info about posts with query X
2. Copy query X
3. SELECT all tags WHERE post_id IN (SELECT post_ids FROM query X)
4. Associate the resulting tags with the posts
When original query contains .order_by(func.random()), it looks like
this:
1. SELECT post.* FROM post ORDER BY random() LIMIT 10
2. Copy "ORDER BY random() LIMIT 10"
3. SELECT tag.* FROM tag WHERE tag.post_id IN (
SELECT id FROM post ORDER BY random() LIMIT 10)
4. Disaster! Each post now has completely arbitrary tags!
To circumvent this, we replace eager loading with lazy loading. This
generates one extra query for each result row, but it has no chance of
producing such anomalies. This behavior is activated only for
queries containing "sort:random" and derivatives so it shouldn't hit
performance too much.
2016-08-27 01:21:59 +02:00
rr-
f8e91a10e8
server/search: refactor query factories
2016-08-27 01:19:29 +02:00
rr-
6d26b5c37a
server/search: fix sort:random
2016-08-26 23:27:33 +02:00
rr-
fa60b42f65
server/search: improve post list performance
2016-08-26 17:57:20 +02:00
rr-
422b99ac8d
server/search: add content-checksum
2016-08-26 16:26:06 +02:00
rr-
ffb87f1650
server/posts: defer flush; save content lazily
...
Rather than flushing the post right away only to find out that there
were validation errors, try to postpone flushing for as long as
possible.
The previous behavior has led to too eager spending of post IDs - each
flush calls nextval(post_id_seq), and postgres sequences are not
affected by transaction rollbacks, so each erroneous post creation
discarded a post ID, which has led to gaps in post IDs.
2016-08-26 15:09:08 +02:00
rr-
bb369efa99
server/general: disable autoflush
2016-08-26 14:41:05 +02:00
rr-
280a55046a
server/db: make query counter thread-local
2016-08-24 12:31:55 +02:00
rr-
73a8542220
server/posts: make anon snapshots for anon uploads
2016-08-22 20:07:39 +02:00
rr-
61d084cc66
server/search: support 'submit:' for anon uploads
2016-08-22 19:45:25 +02:00
rr-
b7e9cbd541
server/posts: allow tagless posts
2016-08-21 23:40:01 +02:00
rr-
28bcbd33b9
server/posts: use SHA1 checksums
...
This changes the checksums to ones that are compatible with 1.x, which
relieves the migration script from recalculating the checksums for all
the posts.
2016-08-20 13:06:19 +02:00
rr-
80af79779d
server/snapshots: rewrite
2016-08-16 21:51:25 +02:00
rr-
65119d69ab
server/rest: urldecode incoming paths
2016-08-16 21:42:11 +02:00
rr-
0c2efc0be5
server/rest: work around Python bug 27777
...
(See http://bugs.python.org/issue27777 )
2016-08-16 21:42:11 +02:00
rr-
e89a086d58
server/rest: fix reporting parameter type errors
2016-08-16 21:42:11 +02:00
rr-
ff7bbbdd8a
server/db: fix upgrade (regression from 9aea55e
)
2016-08-16 21:42:11 +02:00
rr-
6c29377f6b
server/db: allow full DSN; use memdb in tests
...
The earlier commit is still relevant as it allows to integrate real
database when needed.
2016-08-16 21:42:09 +02:00
rr-
e688f39887
server/db: specify nullable for foreign keys
...
This is mostly stylistic change, but it clearly shows the intended
behavior should we detect more integrity violation errors.
2016-08-16 17:22:33 +02:00
rr-
522886ae6c
server/db: fix user cascade deletions
2016-08-16 17:22:33 +02:00
rr-
a224297c4f
server/db: poor fix for tag aliases' order
...
It's a hack, but it seems to work okay.
2016-08-16 17:22:33 +02:00
rr-
48af5160df
server/search: fix negative offsets causing ISE
2016-08-16 17:22:33 +02:00
rr-
87b1ee4564
server/tests: use real database
...
I'm experimenting with snapshots and found following limitation of
SQLite: https://www.sqlite.org/isolation.html
2016-08-16 17:22:33 +02:00
rr-
0320a0b55b
server/general: improve versioning effectiveness
...
...by integrating it with sqlalchemy that adds WHERE conditions for each
UPDATE and DELETE statement.
2016-08-16 17:22:33 +02:00
rr-
ef4af697c4
server/tags: fix tag sorting
...
Brainfart from d6942121e5
2016-08-14 17:54:15 +02:00
rr-
663aacdf82
server/tools: add lint script
...
Integrated both pylint and pycodestyle.
2016-08-14 16:46:50 +02:00
rr-
9aea55e3d1
server/general: embrace most of PEP8
...
Ignored only the rules about continuing / hanging indentation.
Also, added __init__.py to tests so that pylint discovers them. (I don't
buy pytest's BS about installing your package.)
2016-08-14 16:44:03 +02:00
rr-
af62f8c45a
server/general: ditch falcon for in-house WSGI app
...
For quite some time, I hated Falcon's class maps approach that caused
more chaos than good for Szurubooru. I've taken a look at the other
frameworks (hug, flask, etc) again, but they all looked too
bloated/over-engineered. I decided to just talk to WSGI myself.
Regex-based routing may not be the fastest in the world, but I'm fine
with response time of 10 ms for cached /posts.
2016-08-14 16:43:35 +02:00
rr-
d102c9bdba
server/tests: update func.posts tests
2016-08-14 16:43:35 +02:00
rr-
264f9ee70b
server/tests: update func.mime tests
2016-08-14 16:43:35 +02:00
rr-
c23c401c4d
server/tests: add func.tags tests
2016-08-14 16:43:35 +02:00
rr-
53e96ba41f
server/tests: add func.tag_categories tests
2016-08-14 16:43:35 +02:00
rr-
81dfbaec98
server/tests: add func.users tests
2016-08-14 16:43:35 +02:00
rr-
03c74cb5a3
server/tests: add func.comments tests
2016-08-14 16:43:35 +02:00
rr-
65efc309a8
server/comments: catch bad IDs
2016-08-14 16:43:31 +02:00
rr-
56b3eb9674
server/util: fix case conversion
2016-08-14 16:43:04 +02:00
rr-
86452019a3
server/util: improve catching bad field names
...
KeyError could catch exceptions that happened inside the serializer
routine and mistakenly report them as an error with user input.
2016-08-14 16:43:04 +02:00
rr-
f6f07a35df
server/general: authenticated_user->auth_user
2016-08-14 16:43:04 +02:00
rr-
c2bbf7b62c
server/general: add assertions
2016-08-14 16:43:04 +02:00
rr-
bb86e9bf56
server/posts: add more safety checks for notes
2016-08-14 16:43:04 +02:00
rr-
7cd4a1a530
server/tags: verify description size
2016-08-14 16:43:01 +02:00
rr-
3db4f39545
server/tag-categories: correct exception type
2016-08-14 12:31:46 +02:00
rr-
92075bb455
server/tags: don't verify tag names while getting
2016-08-14 12:31:46 +02:00
rr-
d6942121e5
server/tags: change tags sort order
2016-08-14 12:31:21 +02:00
rr-
07237bc2bc
server/tags: fix changing name case
2016-08-14 11:39:04 +02:00
rr-
7e5deee76b
server/tags: fix tag merging
2016-08-14 11:39:04 +02:00
rr-
2b3d193b7c
server/tags: don't auto-create tag categories
2016-08-14 11:38:59 +02:00
rr-
8d04df38fd
server/general: add entity versions
2016-08-07 09:55:51 +02:00
rr-
9e2dace73f
server/posts: improve errors for bad note points
2016-08-05 23:02:34 +02:00
rr-
5092c2c587
server/posts: respect tag creating privilege
2016-08-02 12:44:38 +02:00
rr-
a9338f6490
server/general: fix pylint warnings
2016-08-02 12:27:01 +02:00
rr-
2429e95102
server/users: fix cascade deletions
2016-08-02 12:27:01 +02:00
rr-
ff189a3915
server/posts: fix deleting post with comments
2016-08-02 12:27:01 +02:00
rr-
92d290b2a4
server/posts: fix removing custom thumbnails
2016-07-31 23:53:23 +02:00
rr-
5e47c5c0c6
server/users: use HTTPS for Gravatar
2016-07-30 13:43:15 +02:00
rr-
ef76cdaf8a
server/posts: always use null size for bad images
2016-07-30 13:43:15 +02:00
rr-
298aedbc75
server/tags: sort relations like post tags
2016-07-30 13:43:15 +02:00
rr-
f40e41ae8b
server/tags: allow deleting used tags
2016-07-30 13:43:15 +02:00
rr-
8ef0017531
server/tags: improve tag export performance
...
2000 ms --> 250 ms (including overhead of unknown size).
Not bad if you ask me.
2016-07-26 23:20:15 +02:00
rr-
3f2717843a
server/middleware: log request method
2016-07-26 23:20:15 +02:00
rr-
603420a31d
server/middleware: remove unused import
2016-07-17 21:14:56 +02:00
rr-
247a1e9bbe
server/tools: migrate files incrementally
2016-07-17 21:14:03 +02:00
rr-
b7f2982c9e
server/posts: fix relations bidirectionality
2016-07-17 21:14:03 +02:00
rr-
c472229bae
server/posts: add relationCount field
2016-07-03 18:30:32 +02:00
rr-
c21494be25
server/posts: make relations bidirectional
2016-07-03 18:30:32 +02:00
rr-
48d6fb6b43
server/posts: include thumbnail URLs in relations
2016-07-03 18:30:32 +02:00
rr-
5800f0ebc7
server/tags: fix merging tags
...
It violated unique constraint on post_tag when a given post was already
tagged with the target tag.
2016-07-03 18:30:32 +02:00
rr-
af36c90618
server/general: improve request logging
2016-07-03 18:30:28 +02:00
rr-
ac23067fdf
server/general: use UTC time stamps
2016-07-03 14:46:28 +02:00
rr-
aa0463dafb
server/tags: improve creation privilege check
2016-06-23 12:51:44 +02:00
rr-
d21b87581d
server/general: add show_sql separate from debug
2016-06-23 12:20:05 +02:00
rr-
7eec347bca
server/tags: add description field
2016-06-23 00:15:25 +02:00
rr-
2651cbb374
server/users: allow empty avatars if they existed
2016-06-19 19:43:53 +02:00
rr-
4ec826d0a5
server/tags: replace ILIKE expressions
...
While it makes sense to use ILIKE in search configs to expose side
effects regarding _ and % for power users to use, it certainly didn't
make sense in places changed by this commit. For example, visiting
/tag/___ led to internal server error.
2016-06-18 11:30:32 +02:00
rr-
3c3d0dbb8d
server/info: expose a few config variables
2016-06-18 10:55:44 +02:00
rr-
13ca94d4da
server/users: fix avatar issues when renaming user
2016-06-17 21:25:28 +02:00
rr-
1019062698
server/users: fix fetching columns
2016-06-16 23:42:36 +02:00
rr-
48cf3b47c0
server/users: don't fetch stats eagerly
2016-06-14 07:50:22 +02:00
rr-
d0aaf8fa8f
server/posts: optimize default sort order
2016-06-14 07:50:22 +02:00
rr-
36eddad424
server/posts: optimize 'posts around' query
2016-06-14 07:50:22 +02:00
rr-
6b68c77e17
server/posts: add relation-count token
2016-06-13 20:09:15 +02:00
rr-
7a6d25ac43
server/tags: cache default tag category
2016-06-12 22:30:05 +02:00
rr-
162904bfc3
server/info: add serverTime field
2016-06-12 14:26:52 +02:00
rr-
40565e82ae
server/posts: change comment-time behavior
...
Rather than looking at the edit time, now it looks at the creation time.
2016-06-12 14:24:14 +02:00
rr-
a67db59d99
server/comments: fix serializing cached scores
2016-06-12 14:01:38 +02:00
rr-
e9fb93d5c8
server/general: rename _fields to fields
2016-06-11 22:33:33 +02:00
rr-
8c952c08d0
server/general: report bad field names to user
2016-06-11 17:36:02 +02:00
rr-
b13f9dcb68
server/posts: fix comments order
2016-06-11 17:36:02 +02:00
rr-
616854fb1b
server/users: let authorized users GET themselves
2016-06-11 17:36:02 +02:00
rr-
b5aa3e75c4
server/comments: fix privileges
2016-06-11 17:36:02 +02:00
rr-
5090e3f6c9
server/comments: fix missing score field
2016-06-11 09:29:23 +02:00
rr-
dfb2e3d027
server/posts: add getting posts around id
...
Leave undocumented since it add almost no value for the client
applications.
2016-06-08 22:38:35 +02:00
rr-
ded89fee5f
server/posts: fix handling bad post ID
2016-06-08 22:38:35 +02:00
rr-
053d1889e0
server/scores: voting for <1 removes favorite
2016-06-08 22:38:35 +02:00
rr-
b28f689077
server/posts: add ownFavorite field to posts
2016-06-08 22:38:35 +02:00
rr-
93a5af2097
server/posts: sort by tag category, then by name
2016-06-06 07:46:19 +02:00
rr-
f3bb6c28a1
server/general: cosmetic fixes
2016-06-05 10:39:56 +02:00
rr-
508cb6e7ab
server/posts: allow anonymous uploads ( #90 )
2016-06-05 10:30:10 +02:00
rr-
caecaee785
server/users: offer more stats in user entity
2016-06-03 21:46:25 +02:00
rr-
805ca845e3
server/users: reduce user fields footprint
2016-06-03 20:14:01 +02:00
rr-
8a5c6f0b31
server/search: fix caching special tokens
...
special:liked was being reused between users. Now the cache internally
caches object similar to liked:USER.
2016-06-03 19:47:09 +02:00
rr-
f0d3589344
server/search: cache by query rather than its text
2016-06-03 19:47:09 +02:00
rr-
59ad5fe402
server/search: refactor, extract parsing
2016-06-03 19:47:09 +02:00
rr-
4428ccfd38
server/images: remove debug blob
2016-06-02 23:42:12 +02:00
rr-
28009bf46d
server/general: fix pylint warnings
2016-06-02 23:39:38 +02:00
rr-
7c7adafd82
server/search: improve error messages
2016-06-02 21:15:29 +02:00
rr-
a72f6aa585
server/search: fix searching for invalid numbers
2016-06-02 20:56:28 +02:00
rr-
1034362b84
server/search: fix searching by partial range
2016-06-02 20:56:28 +02:00
rr-
802c7feca0
server/search: add safety search for posts
2016-06-02 13:58:08 +02:00
rr-
74fba05302
server/tools: add generate-thumb
2016-06-02 13:58:08 +02:00
rr-
accb5a9187
server/images: fix transaprent background for JPEG
2016-06-02 13:58:08 +02:00
rr-
0743721d06
server/images: seek to 30% video before resizing
2016-06-02 13:58:08 +02:00
rr-
01c74526c7
server/images: work around ffmpeg bug 5609
2016-06-02 13:58:08 +02:00
rr-
446f4d6611
server/search: cache results till non-GET request
...
250 ms per page --> 30 ms per page (save for the first render). I'd say
it's pretty good
2016-05-31 14:18:50 +02:00
rr-
349f32ccf2
server/search: defer most posts columns
2016-05-30 23:36:58 +02:00
rr-
78612e1da1
server/posts: add new fields
2016-05-30 23:23:22 +02:00
rr-
037fbc61ec
server/api: add ability to select fields
2016-05-30 23:08:22 +02:00
rr-
8d1e23aa63
server/general: flatten responses
2016-05-30 22:54:33 +02:00
rr-
d0314813cb
server/general: move extra details to resources
2016-05-30 22:54:33 +02:00
rr-
48bcbbff83
server/search: improve performance
2016-05-30 20:51:52 +02:00
rr-
abef6e5c35
server/info: return who featured the post and when
2016-05-29 12:41:22 +02:00
rr-
1549b70ace
server/tools: fix note snapshots importing
2016-05-29 12:40:36 +02:00
rr-
658b95aad7
server/tools: fix note importing
2016-05-29 12:40:36 +02:00
rr-
d7e46e23ab
server/tools: don't copy avatars for --no-data
2016-05-29 12:40:36 +02:00
rr-
4d1f745e38
server/notes: fix note serialization
2016-05-29 12:40:36 +02:00
rr-
731c0442e9
server/search: change named token detection
...
In particular, treat tokens starting with : as anonymous tokens.
2016-05-24 10:29:14 +02:00
rr-
af22ec735d
server/posts: send mime type to client
2016-05-22 22:50:00 +02:00
rr-
77998f1660
server/tags: let mods set default category
2016-05-22 22:17:11 +02:00
rr-
fa14bf714c
server/tags: create snapshots for automatic tags
2016-05-22 22:17:11 +02:00
rr-
6a48020426
server/tags: fix sorting tag siblings
2016-05-22 22:17:11 +02:00
rr-
cf3b97b8de
server/tags: change response key
...
Since we're using "results" everywhere else, it makes little sense for
tag siblings to use "siblings" node.
2016-05-22 11:05:18 +02:00
rr-
16d4d3ca68
server/favorites: favoriting sets score to 1
2016-05-21 22:35:18 +02:00
rr-
c88dfd228a
server/images: replace pipes with temp files
...
ffmpeg's GIF demuxer needs the input stream to be seekable, which rules
pipes out.
2016-05-20 21:34:02 +02:00
rr-
205f372f76
server/tests: colorize verbose output
2016-05-11 23:47:50 +02:00
rr-
172b956e48
server/search: permit search for tags by alias
2016-05-11 23:47:50 +02:00
rr-
6179f016ae
server/search: make searches case insensitive
2016-05-11 23:47:50 +02:00
rr-
82d32ba1fb
server/tags: fix removing tags related to others
2016-05-11 23:47:50 +02:00
rr-
4cd5b8c1ac
server/tags: fix tag category color validation
...
This was totally stupid...
2016-05-11 22:09:06 +02:00
rr-
a5b2d835d6
server/tags: fix wrong case in merging requests
2016-05-11 18:42:56 +02:00
rr-
59ae0a4c9a
server/db: maintain order of tag aliases
...
First alias has a special meaning in certain contexts, such as post
serialization, where only one alias is chosen to show to the client.
2016-05-11 18:32:53 +02:00
rr-
299055c427
server/tools: fix creating counters
2016-05-11 17:02:41 +02:00
rr-
03498b2d8e
server/tags: add tag category color sanitization
2016-05-10 12:18:06 +02:00
rr-
14a20e55f8
server/tests: fix leftover rank strings
2016-05-10 12:15:33 +02:00
rr-
ba3678dec1
server/posts: implement FLAG_MAP
2016-05-10 12:15:33 +02:00
rr-
4ec842024c
server/users: implement RANK_MAP
2016-05-10 12:15:33 +02:00
rr-
cecf620126
server/config: move config validation to app.py
2016-05-10 12:15:33 +02:00
rr-
cd15cdff7a
server/scores+favorites: merge duplicate code
2016-05-10 12:15:05 +02:00
rr-
f140ae6176
server/tests: change test file name
2016-05-10 12:14:54 +02:00
rr-
174958686c
server/general: disable pylint reports
...
They add no value whatsoever
2016-05-10 12:02:24 +02:00
rr-
3481c1072d
server/general: fix a few pylint warnings
2016-05-10 12:02:24 +02:00
rr-
57297df9e1
server/tools: fix importing tag category with id=0
2016-05-10 10:05:47 +02:00
rr-
b37979546f
server/tools: bump counters after import
2016-05-10 09:54:52 +02:00
rr-
b3f5486761
server/tools: add --no-data option to importer
2016-05-10 09:26:06 +02:00
rr-
ec1fccf17e
server/tools: fix swapping imported tag relations
2016-05-10 09:26:01 +02:00
rr-
a668d3ef34
server/tags: output tag category usages
2016-05-09 22:39:04 +02:00
rr-
fcbfa90879
serevr/tags: fix search by post count and category
2016-05-09 22:36:29 +02:00
rr-
f39e58b1bc
server/db: create indexes
2016-05-09 09:43:00 +02:00
rr-
4558557656
server/tools: add parallelism to content import
2016-05-09 09:42:31 +02:00
rr-
356d5050fd
server/tools: add v1.x migration script
2016-05-08 23:26:46 +02:00
rr-
2330cf017d
server/db: fix mappings
...
Post notes had mixed up column types. I fixed that and at the same time,
I took the opportunity to convert everything into Unicode. Also, I've
changed existing migrations rather than creating new ones - it's not
like we're even close to alpha...
2016-05-08 22:18:13 +02:00
rr-
339c9a3333
server/tags: reduce number of queries
...
On a test page with 50 tags, 158 queries were reduced to 3:
1. Get the authenticated user
2. Get tags for given page
3. Count all tags
Looks just about right.
2016-05-08 20:33:16 +02:00
rr-
d813601d92
server/api: log queries in debug mode
2016-05-08 20:33:16 +02:00
rr-
906eddc61f
server/users: change avatars to PNG
2016-05-08 18:04:06 +02:00
rr-
2bd02f4921
server/users: fix detecting duplicate user names
2016-05-08 18:04:05 +02:00
rr-
0214341473
server/users: prohibit using special ranks
...
Anonymous is self explanatory.
Nobody is used solely to mark certain operation as unavailable even to
administrators (<- nobody is higher than administrator).
2016-05-08 18:04:05 +02:00
rr-
198cb0af3e
server/users: hardcode available ranks
2016-05-08 16:59:25 +02:00
rr-
58964bcdc9
server/posts: add post listing
2016-05-07 21:50:37 +02:00
rr-
9b591c3f1b
server/posts: remember source for URL content
2016-05-05 13:46:57 +02:00
rr-
148858fde9
server/middleware: download files
2016-05-05 13:46:50 +02:00
rr-
ab493a01b4
server/net: add basic downloader
2016-05-05 13:24:50 +02:00
rr-
e632324f72
server/posts: add post updating
2016-05-02 21:58:13 +02:00
rr-
067e438b8c
server/posts: add hasCustomThumbnail to post info
2016-05-02 00:07:33 +02:00
rr-
ce095816d9
server/posts: add post creating
2016-05-02 00:07:33 +02:00
rr-
a567974784
server/general: refactor method names
2016-04-30 23:54:05 +02:00
rr-
f38acf6868
server/func: add content-type related utilities
2016-04-30 17:28:31 +02:00
rr-
4530b6e3b8
server/tests: show SQL queries only with -v
2016-04-30 12:46:52 +02:00
rr-
da5b32feeb
server/users: fix hiding email from admins etc
2016-04-29 13:16:16 +02:00
rr-
c55fb2ef41
server/tags: output tag usage count
2016-04-29 12:58:56 +02:00
rr-
21fd25dd12
server/tags: create tag categories automatically
2016-04-29 12:58:56 +02:00
rr-
f59c1e0346
server/tags: create tag categories automatically
2016-04-29 10:33:46 +02:00
rr-
83cc7a568d
server/posts: add post (un)favoriting
2016-04-28 19:04:44 +02:00
rr-
0b20132a2f
server/api + docs/api: organize responses
2016-04-28 18:20:50 +02:00
rr-
2b69e9b461
server/posts: add post deleting
2016-04-27 19:24:50 +02:00
rr-
587a8f8276
server/posts: add post retrieving
2016-04-25 10:48:15 +02:00
rr-
52f4018bee
server/comments+posts: add rating
2016-04-24 16:37:11 +02:00
rr-
8fb536c8f0
server/general: move not found errors to func
2016-04-24 14:34:01 +02:00
rr-
0b47957bb9
server/comments: add comment search
2016-04-24 11:56:14 +02:00
rr-
b75cfff8f7
server/comments: add comment retrieving
2016-04-24 11:24:36 +02:00
rr-
10f8f443f1
server/comments: add comment deleting
2016-04-24 11:16:24 +02:00
rr-
48cb172cc8
server/comments: add comment updating
2016-04-24 10:31:49 +02:00
rr-
612734e9ff
server/comments: add comment creating
2016-04-24 10:31:49 +02:00
rr-
6e6c57d44a
server/api: move serializers to func layer
2016-04-24 10:31:49 +02:00
rr-
093863b944
server/comments: add comment tables
2016-04-24 10:31:49 +02:00
rr-
1476c84a9d
server/posts: add featured post retrieval
2016-04-23 08:07:21 +02:00
rr-
cf00a3a2de
server/posts: add post featuring
2016-04-22 20:58:04 +02:00
rr-
a30886cc70
server/search: rename order: to sort:
2016-04-22 19:37:58 +02:00
rr-
14059de1d7
server/db: add more post tables
2016-04-22 18:36:12 +02:00
rr-
a67a5069b7
server/info: implement simple global info
...
For now it returns total post count and disk usage. To reduce stress on
the file system, the disk usage is cached for an hour.
2016-04-21 19:48:47 +02:00
rr-
46ee9faf72
server/snapshots: add snapshot lists
2016-04-21 19:27:30 +02:00
rr-
c2a39a0fd5
server/snapshots: change snapshot representation
2016-04-21 19:01:41 +02:00
rr-
97bd935bb6
server/tags: add listing tag siblings
2016-04-20 21:31:46 +02:00
rr-
747c730688
server/tags: add tag merging
2016-04-20 19:02:39 +02:00
rr-
74fb297584
server/db: fix aggregates
2016-04-20 15:17:11 +02:00
rr-
a926838b90
server/general: rename 'misc' to 'util'
2016-04-20 11:59:46 +02:00
rr-
57b18c6461
server/general: rename 'util' to 'func'
2016-04-20 11:58:17 +02:00
rr-
d3f2ef296b
server/tests: don't recreate database every test
2016-04-20 11:48:34 +02:00
rr-
661c0248d2
server/api: return snapshots to client
2016-04-20 11:15:46 +02:00
rr-
9a4b5a7dd3
server/tags: record tag category snapshots
2016-04-19 18:11:00 +02:00
rr-
2e57a0746f
server/general: consistently use db.session
2016-04-19 18:10:22 +02:00
rr-
fe56e376f6
server/tags: export also tag categories
2016-04-19 15:51:26 +02:00
rr-
884747bbbd
server/tags: prohibit deleting last tag category
2016-04-19 13:10:07 +02:00
rr-
58838f8bd9
server/tests: refactor tests
2016-04-19 13:01:50 +02:00
rr-
15f734d21b
server/api: output JSON for HTTP 405
2016-04-19 12:40:08 +02:00
rr-
59473799a4
server/db: add missing migrations
2016-04-19 12:08:59 +02:00
rr-
2fba374e65
server/tags: introduce tag category API
2016-04-19 12:05:14 +02:00
rr-
83784c5e76
server/api: improve input sanitization, fix docs
2016-04-19 11:55:31 +02:00
rr-
7263849fac
server/tags: make creating tag relations optional
2016-04-19 00:18:52 +02:00
rr-
1597ae7c5c
server/db: refactor session usage
2016-04-18 23:06:51 +02:00
rr-
bba327fe8a
server/middleware: fix session usage
2016-04-18 22:08:30 +02:00
rr-
e3a4793d54
server/tags: move tag categories to database
2016-04-18 22:08:30 +02:00
rr-
9350c4ff97
server/snapshots: add snapshots to tags
2016-04-18 20:44:39 +02:00
rr-
1c064778c6
server/tests: adapt freezegun
...
The reason why this is added to the project is because it has turned out
mocking the time is not as trivial as I originally anticipated
(specifically, there are some problems with SQLite).
2016-04-18 19:42:24 +02:00
rr-
e8a9c4ad51
server/db: fix ambiguous names
2016-04-18 19:24:09 +02:00