Commit Graph

40 Commits

Author SHA1 Message Date
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
2022-04-07 14:06:25 -04:00
Barış Soner Uşaklı
8379c11b22 refactor: setObjectBulk to match sortedSetAddBulk 2021-11-12 19:51:59 -05:00
Barış Soner Uşaklı
ea04aeded4 perf: convert promise.all to single query (#9851) 2021-10-01 15:24:19 -04:00
Barış Soner Uşaklı
0ce4b87d85 fix: #9781 (#9782) 2021-09-03 20:34:42 -04:00
Barış Soner Uşaklı
2c22b06feb fix: isObjectField(s) empty field 2021-05-06 12:44:01 -04:00
Barış Soner Uşaklı
92de49be00 test: add test for undefined fields in getObjectsFields 2021-04-22 11:14:47 -04:00
Barış Soner Uşaklı
4327a09d76 feat: allow optional fields argument on db.getObject(s) (#9385) 2021-03-14 11:40:54 -04:00
Peter Jaszkowiak
dab3b23575 chore: eslint no-var, vars-on-top 2021-02-08 18:06:44 -05:00
Peter Jaszkowiak
b56d9e12b5 chore: eslint prefer-arrow-callback 2021-02-08 18:06:44 -05:00
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
2021-02-07 15:09:52 -05:00
Barış Soner Uşaklı
7f5efc3e93 fix: #8992, set email:confirmed for first admin user 2020-11-28 14:43:28 -05:00
Barış Soner Uşaklı
5bb5ec4618 fix: #8954, clear purged replies and toPids (#8959)
* fix: #8954, clear purged replies and toPids

* fix: redis test
2020-11-26 12:04:01 -05:00
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.'
2020-10-15 22:25:56 -04:00
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
2020-06-18 23:16:48 -04:00
Barış Soner Uşaklı
7a801abade fix: tests on redis 2020-05-16 22:49:34 -04:00
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
2019-07-12 14:06:09 -04:00
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
2019-04-24 14:38:46 -04:00
Barış Soner Uşaklı
3917022a48 fix: #7139 2018-12-19 11:09:19 -05:00
Barış Soner Uşaklı
75816deca7 add cache to redis (#6917)
* add cache to redis

move out cache module from mongo

* fix redis tests

* add callback noop

* fix typo

* del cache on field delete

* make redis/mongo caches separate
2018-11-07 15:04:56 -05:00
Barış Soner Uşaklı
be5c237388 fix decr/incrObjectField if key in array doesn't exist create it 2018-03-17 19:08:52 -04:00
Barış Soner Uşaklı
6a9a73c86c changes to leaveAllGroups
Groups.destroy can take an array of groupnames
Groups.leave can take an array of groupnames
db.incrObjectField/decrObjectField can take an array of keys
db.sortedSetRemove can take an array of keys and values
db.setRemove can take an array of keys
2018-03-17 18:49:38 -04:00
Barış Soner Uşaklı
b084a596fa closes #6301 2018-02-01 14:33:06 -05:00
Baris Usakli
dbf815ed47 closes #6103 2017-11-22 12:10:40 -05:00
Barış Soner Uşaklı
e7318a1cea Mongo cache (#6002)
* cache mongodb objects

remove user settings cache since it is cached at the object level

* removed indexOf from isMemberOfSets

* change has to get, change maxAge to 0
2017-10-23 18:31:16 -04:00
Barış Soner Uşaklı
5a55c882ab convert NaN uids to 0 2017-06-01 16:17:08 -04:00
Peter Jaszkowiak
b171f3072b Fix many "duplicate key" errors
- Reset defaults after every test
- Remove individual `after(db.emptydb)` calls
- Fix async.every in groups test
- Update plugin list in socket tests
2017-05-26 17:16:59 -06:00
Barış Soner Uşaklı
95196ceedc closes #5692 2017-05-19 14:52:36 -04:00
barisusakli
d8170d5d1c fix tests 2017-04-19 13:09:16 -04:00
barisusakli
4d1b8d7460 fix lint 2017-04-14 15:15:25 -04:00
barisusakli
92343eb2e1 fix mongo setObject if key/value is empty string 2017-04-14 13:58:32 -04:00
Peter Jaszkowiak
896c8c7343 ESlint object-curly-spacing 2017-02-18 12:30:49 -07:00
Peter Jaszkowiak
277a7fb8b4 ESlint key-spacing, no-trailing-spaces 2017-02-18 01:27:46 -07:00
Peter Jaszkowiak
52f2028206 ESlint no-multiple-empty-lines 2017-02-17 22:08:23 -07:00
Peter Jaszkowiak
b09b3aef7f ESlint no-undef, remove global comments 2017-02-17 22:03:55 -07:00
Peter Jaszkowiak
2ba46808a1 ESlint one-var, fix comma-dangle 2017-02-17 20:20:42 -07:00
Peter Jaszkowiak
bc1d70c126 ESlint comma-dangle 2017-02-17 19:31:21 -07:00
barisusakli
5d6e2ad083 multiple test fixes 2016-11-23 17:15:36 +03:00
barisusakli
4a0f67afdc search tests
new method emptydb
use emptydb instead of flushdb, flushdb  removes indices for mongo which
breaks search tests
initialize meta.config properly in tests
enable nodebb-plugin-dbsearch for tests
2016-10-17 23:34:14 +03:00
HeeL
4a3c31b2dc Fix space-before-function-paren linter rule 2016-10-13 11:43:39 +02:00
HeeL
4c6a75d85c Rename tests folder to test to follow standards 2016-09-28 10:01:37 +02:00