112 Commits (529f2d17305582f04f2923f76c1d0fe20476782c)

Author SHA1 Message Date
Barış Soner Uşaklı f083cd559d
feat: add getSortedSetMembersWithScores (#11579)
* feat: add getSortedSetMembersWithScores

* lint: fix

* test: fix redis

* fix: mongo/psql
2 years ago
Barış Soner Uşaklı 6bed65dde6
fix: numeric strings in mongo (#11498) 2 years ago
Barış Soner Uşaklı 56427e4f9d fix: closes #11343, don't crash if tags array is empty 2 years ago
Barış Soner Uşaklı 767973717b
perf: WIP #10449, allow array of pids for posts.purge (#10465)
* perf: WIP #10449, allow array of pids for posts.purge

* refactor: deletePostDiffs

* perf: deletePostFromReplies/deletePostFromGroups

* refactor: upload

* refactor: deleteFromCategoryRecentPosts

deleteFromUsersBookmarks
deleteFromUsersVotes

* feat: closes #10468, add incrObjectFieldByBulk

* refactor: allow nids for notifications.rescind

* refactor: allow uids array for user.updatePostCount

* refactor: rewrite deleteFromTopicUserNotification to work with an array

* feat: deprecate action:post.purge as well

* lint: add missing comma
3 years ago
CommanderRoot 200f0b2e4f
refactor: replace deprecated String.prototype.substr() (#10432)
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
3 years ago
Julian Lam 606808760e
test: add test to verify that a sorted set is automatically deleted if its last element is removed (#10261)
* test: add test to verify that a sorted set is automatically deleted if its last element is removed

* fix: remote empty zsets when all elements have been removed #yolo

* Revert "fix: remote empty zsets when all elements have been removed #yolo"

This reverts commit 0ac73244bb6ffd802007a252a35844c589ce8721.

* fix: altered behaviour in module.exists instead of zrem
3 years ago
Barış Soner Uşaklı 6ea3b51f12
Zincrybulk (#9975)
* feat: zincry bulk

* feat: psql bulk incr placeholder

* test: redis test fix

* test: redis test
3 years ago
Barış Soner Uşaklı 4359e5c97c refactor: remove tabs after declaration 3 years ago
Barış Soner Uşaklı 8379c11b22 refactor: setObjectBulk to match sortedSetAddBulk 3 years ago
Barış Soner Uşaklı e6a17a6349
Psql multikey (#9852)
* perf: convert promise.all to single query

* perf: single query for removeBulk

* perf: list
3 years ago
Barış Soner Uşaklı ea04aeded4
perf: convert promise.all to single query (#9851) 3 years ago
Barış Soner Uşaklı 397835a05a feat: allow removing multiple items from list 3 years ago
Barış Soner Uşaklı 0ce4b87d85
fix: #9781 (#9782) 3 years ago
Barış Soner Uşaklı e59d357533
feat: als (#9749)
* feat: als

* fix: up test timeout

* fix: don't overwrite caller if it already exists

* fix: up test timeout for psql
3 years ago
Barış Soner Uşaklı 2c22b06feb fix: isObjectField(s) empty field 4 years ago
Barış Soner Uşaklı 92de49be00 test: add test for undefined fields in getObjectsFields 4 years ago
Barış Soner Uşaklı 4327a09d76
feat: allow optional fields argument on db.getObject(s) (#9385) 4 years ago
Barış Soner Uşaklı 8f0386d9ac
feat: add failing test for list append/prepend with list (#9303)
* feat: add failing test for list append/prepend with list

* feat: mongo/psql

* feat: improve test
4 years ago
Peter Jaszkowiak dab3b23575 chore: eslint no-var, vars-on-top 4 years ago
Peter Jaszkowiak b56d9e12b5 chore: eslint prefer-arrow-callback 4 years ago
Peter Jaszkowiak 707b55b6a5 chore: eslint prefer-template 4 years ago
Barış Soner Uşaklı 47299ea587
Categories refactor (#9257)
* feat: wip categories pagination

* feat: add subCategoriesPerPage setting

* feat: add load more sub categories button to category page

* fix: openapi spec

* feat: show sub categories left on category page

hide button when no more categories left

* breaking: rename categories to allCategories on /search

categories contains the search results

* fix: spec

* refactor: remove cidsPerPage

* fix: tests

* feat: use component for subcategories

* fix: prevent negative subCategoriesLeft

* feat: new category filter/search WIP

* feat: remove categories from /tag

* fix: dont load all categories when showing move modal

* feat: allow adding custom categories to list

* breaking: dont load entire category tree on post queue

removed unused code
add hooks to filter/selector
add options to filter/selector

* feat: make selector modal work again

* feat: replace old search module

* fix: topic move selector

* feat: dont load all categories on create category modal

* fix: fix more categorySelectors

* feat: dont load entire category tree on group details page

* feat: dont load all categories on home page and user settings page

* feat: add pagination to /user/:userslug/categories

* fix: update schemas

* fix: more tests

* fix: test

* feat: flags page, dont return entire category tree

* fix: flag test

* feat: categories manage page

dont load all categories
allow changing root category
clear caches properly

* fix: spec

* feat: admins&mods page

dont load all categories

* fix: spec

* fix: dont load all children when opening dropdown

* fix: on search results dont return all children

* refactor: pass all options, rename options.cids to options.selectedCids

* fix: #9266

* fix: index 0

* fix: spec

* feat: #9265, add setObjectBulk

* refactor: shoter updateOrder

* feat: selectors on categories/category

* fix: tests and search filter

* fix: category update test

* feat: pagination on acp categories page

show order in set order modal

* fix: allow drag&drop on pages > 1 in /admin/manage/categories

* fix: teasers for deep nested categories

fix sub category display on /category page

* fix: spec

* refactor: use eslint-disable-next-line

* refactor: shorter
4 years ago
Barış Soner Uşaklı 0d7dfeeb86 chore: increase test timeout 4 years ago
Barış Soner Uşaklı 7f5efc3e93 fix: #8992, set email:confirmed for first admin user 4 years ago
Barış Soner Uşaklı 5bb5ec4618
fix: #8954, clear purged replies and toPids (#8959)
* fix: #8954, clear purged replies and toPids

* fix: redis test
4 years ago
Barış Soner Uşaklı b2ff1594b8 fix: redis hget
'node_redis: The HGET command contains a invalid argument type.\n' +
'Only strings, dates and buffers are accepted. Please update your code to use valid argument types.'
4 years ago
Timothy Fike 5078a8df25
ttl/pttl (#8689) 4 years ago
Barış Soner Uşaklı 9389749b79 feat: sorted set lex test 4 years ago
Barış Soner Uşaklı e95cd28f6f
Zscan (#8458)
* feat: zscan

* fix: mongodb tests

* feat: scan, ip search starts with
5 years ago
Barış Soner Uşaklı 723fe8e8e0
feat: zscan (#8457)
* feat: zscan

* fix: mongodb tests
5 years ago
Barış Soner Uşaklı bef37e27cb
fix: test lock for user create (#8415)
* fix: test lock for user create

* fix: redis hdel with undefined

* feat: add test for undefined key in deleteObjectFields
5 years ago
Barış Soner Uşaklı 0009f54e6e feat: add getSortedSetMembers 5 years ago
Barış Soner Uşaklı 3b6d57e497 refactor: move code 5 years ago
Barış Soner Uşaklı 4ee3543ea4 feat: tweak intersection code, add tests 5 years ago
Barış Soner Uşaklı 12c6bc2e07 feat: convert queries so they used indices directly 5 years ago
Barış Soner Uşaklı 7a801abade fix: tests on redis 5 years ago
Barış Soner Uşaklı edf9fe3b7f feat: add null tests for sorted sets 5 years ago
Barış Soner Uşaklı 310c6fd33f
properly filter /unread /recent /popular /top (#7927)
* feat: add failing test for pagination

* feat: test

* fix: redis tests

* refactor: remove logs

* fix: add new test

* feat: make sortedSetRangeByScore work with keys on redis

* fix: hardcoded set name

* feat: show topics from readable categories on recent/popular/top

* feat: rewrite unread topics

respect watched categories and followed topics

* fix: term + watched
5 years ago
Barış Soner Uşaklı 22b02f1407
feat: add failing test for pagination (#7924)
* feat: add failing test for pagination

* feat: test

* fix: redis tests

* refactor: remove logs
5 years ago
Barış Soner Uşaklı b602c04463 feat: refactor getSortedSetRange to allow big arrays 5 years ago
Baris Usakli 1e5246f9ad feat: add new test 5 years ago
Barış Soner Uşaklı 1e0190abef fix: #7842, groups.invite works with an array of uids 5 years ago
Barış Soner Uşaklı 53e1b349ae
Change post owner (#7752)
* feat: #7749, allow array of keys for setObject

* feat: sortedSetRemoveBulk

* feat: test for bulk remove

* feat: #7083, ability to change post ownership

* feat: #7083, fix tid:<tid>:posters

* feat: #7083, front end

* fix: #7752, psql methods

* fix: add missing await

* fix: maybe psql
6 years ago
Barış Soner Uşaklı 805dcd7ca2
Async refactor in place (#7736)
* feat: allow both callback&and await

* feat: ignore async key

* feat: callbackify and promisify in same file

* Revert "feat: callbackify and promisify in same file"

This reverts commit cea206a9b8e6d8295310074b18cc82a504487862.

* feat: no need to store .callbackify

* feat: change getTopics to async

* feat: remove .async

* fix: byScore

* feat: rewrite topics/index and social with async/await

* fix: rewrite topics/data.js

fix issue with async.waterfall, only pass result if its not undefined

* feat: add callbackify to redis/psql

* feat: psql use await

* fix: redis 🌋

* feat: less returns

* feat: more await rewrite

* fix: redis tests

* feat: convert sortedSetAdd

rewrite psql transaction to async/await

* feat: 🐶

* feat: test

* feat: log client and query

* feat: log bind

* feat: more logs

* feat: more logs

* feat: check perform

* feat: dont callbackify transaction

* feat: remove logs

* fix: main functions

* feat: more logs

* fix: increment

* fix: rename

* feat: remove cls

* fix: remove console.log

* feat: add deprecation message to .async usage

* feat: update more dbal methods

* fix: redis :voodoo:

* feat:  fix redis zrem, convert setObject

* feat: upgrade getObject methods

* fix: psql getObjectField

* fix: redis tests

* feat: getObjectKeys

* feat: getObjectValues

* feat: isObjectField

* fix: add missing return

* feat: delObjectField

* feat: incrObjectField

* fix: add missing await

* feat: remove exposed helpers

* feat: list methods

* feat: flush/empty

* feat: delete

* fix: redis delete all

* feat: get/set

* feat: incr/rename

* feat: type

* feat: expire

* feat: setAdd

* feat: setRemove

* feat: isSetMember

* feat: getSetMembers

* feat: setCount, setRemoveRandom

* feat: zcard,zcount

* feat: sortedSetRank

* feat: isSortedSetMember

* feat: zincrby

* feat: sortedSetLex

* feat: processSortedSet

* fix: add mising await

* feat: debug psql

* fix: psql test

* fix: test

* fix: another test

* fix: test fix

* fix: psql tests

* feat: remove logs

* feat: user arrow func

use builtin async promises

* feat: topic bookmarks

* feat: topic.delete

* feat: topic.restore

* feat: topics.purge

* feat: merge

* feat: suggested

* feat: topics/user.js

* feat: topics modules

* feat: topics/follow

* fix: deprecation msg

* feat: fork

* feat: topics/posts

* feat: sorted/recent

* feat: topic/teaser

* feat: topics/tools

* feat: topics/unread

* feat: add back node versions

disable deprecation notice
wrap async controllers in try/catch

* feat: use db directly

* feat: promisify in place

* fix: redis/psql

* feat: deprecation message

logs for psql

* feat: more logs

* feat: more logs

* feat: logs again

* feat: more logs

* fix: call release

* feat: restore travis, remove logs

* fix: loops

* feat: remove .async. usage
6 years ago
Barış Soner Uşaklı bd640a1107
Topic await errors (#7727)
* feat: derp await

* feat: restore user.getSettings

* feat: cleanup

* feat: make tid const

* feat: cleanup

* fix: tests

* feat: deprecate filter:controllers.topic.get

* feat: rewrite post-index logic

* feat: change calculation to match others

* fix: use .async

* feat: remove try/catch wrapper
6 years ago
Barış Soner Uşaklı 3ecd703ea3 feat: #7707, added sortedSetAddBulk 6 years ago
Barış Soner Uşaklı a39f0ef592 fix: #5570, create per category user post zsets 6 years ago
Baris Usakli 31ccc860d3 feat: allow multiple scores in sortedSetsAdd 6 years ago
Barış Soner Uşaklı 2c98dd5f9d
Object cache refactor (#7558)
* fix: cache refactor

db.getObjectField no longer loads entire object
db.getObjectsFields only clones data once
more tests

* feat: add back cache to redis

db.getObjectField no longer loads entire object
6 years ago
Barış Soner Uşaklı 5917dec288
fix: only allow numbers as scores (#7356)
* zadd score checks

* fix: only allow numbers as scores

* fix: convert values to strings
6 years ago