Commit Graph

119 Commits

Author SHA1 Message Date
Barış Soner Uşaklı
18252fb9a8 refactor: no regex 2021-09-20 10:41:26 -04:00
Barış Soner Uşaklı
31a6d4b39a fix: for subfolders 2021-09-20 10:39:56 -04:00
Barış Soner Uşaklı
0236ea86ad fix: req.path doesn't have full url 2021-09-20 10:24:02 -04:00
Barış Soner Uşaklı
40c9fca918 fix: #9811, send bodyClass on 403
use helpers.formatApiResponse for /api/v3 routes only
2021-09-20 10:11:25 -04:00
Julian Lam
d1959a258b fix: #9670 return 4xx errors instead of 5xx on flag routes, when unauthenticated or not privileged [breaking] 2021-07-21 13:27:41 -04:00
Julian Lam
415416d2a7 fix: translate language keys if passed in to formatApiResponse 2021-07-09 12:24:32 -04:00
Julian Lam
7036c3751e feat: internationalize API error messages 2021-07-09 12:24:32 -04:00
Barış Soner Uşaklı
2ea468daa3 test: clear cache between runs, require middleware later in helpers 2021-04-18 21:57:07 -04:00
Julian Lam
678e8f0fde fix: regression where login redirect for admin routes didn't go to local=1 2021-03-09 20:50:01 -05:00
Peter Jaszkowiak
cc9d6fd08b chore: eslint max-len 2021-02-08 18:06:44 -05:00
Peter Jaszkowiak
23f212a4c0 chore: eslint prefer-destructuring 2021-02-08 18:06:44 -05: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
Peter Jaszkowiak
707b55b6a5 chore: eslint prefer-template 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
Julian Lam
8bbb320867 feat: handle HTTP 429 as a response code 2021-01-07 15:11:45 -05:00
Julian Lam
c043cfebd6 fix: added back missing topic thumb tests that were removed in last commit 2020-12-09 10:42:41 -05:00
Barış Soner Uşaklı
648f6215ef fix: redirect external with absolute urls 2020-12-03 17:20:03 -05:00
Barış Soner Uşaklı
458bfc0faf fix: external path for subfolder installs 2020-12-03 14:52:27 -05:00
Barış Soner Uşaklı
64ac483ddd fix: #9032 2020-12-03 13:51:22 -05:00
Barış Soner Uşaklı
5d00b0895b fix: sso redirect on /login & /api/login 2020-12-03 10:29:18 -05:00
Julian Lam
007a3258a0 feat: add handler for 501 api response 2020-11-27 15:13:33 -05:00
Julian Lam
906d7d734b refactor: move API banned response handler to separate internal method 2020-11-24 13:28:05 -05:00
Julian Lam
afb26bfe48 feat: show ban reason and expiry in write api responses, if user is banned 2020-11-24 10:26:14 -05:00
Barış Soner Uşaklı
5fa098326f fix: https://github.com/NodeBB/NodeBB/pull/8685
fix category link redirect on cold load
fix helpers.redirect if passed in url is external
fix ajaxify so it doesn't slice first character of external url
2020-11-23 12:25:57 -05:00
Julian Lam
6e2da9966e refactor: move plugin hook methods to plugin.hooks.* 2020-11-20 16:32:39 -05:00
Barış Soner Uşaklı
f14e42d8bc fix: #8883 2020-11-14 19:56:01 -05:00
Julian Lam
1446cec77f feat: user exist route in write api 2020-11-06 11:55:04 -05:00
Julian Lam
60e1e99b4f feat: new shorthand route /api/v3/users/bySlug/:userslug
closes #8844
2020-11-06 11:37:21 -05:00
Barış Soner Uşaklı
a05905f196 performance improvements (#8795)
* perf: nconf/winston/render

cache nconf.get calls
modify middleware.pageView to call next earlier
don't call winston.verbose on every hook see https://github.com/winstonjs/winston/issues/1669
translate header/footer separately and cache results for guests

* fix: copy paste fail

* refactor: style and fire hook only log in dev mode

* fix: cache key, header changes based on template

* perf: change replace

* fix: add missing await

* perf: category

* perf: lodash clone

* perf: remove escapeRegexChars
2020-10-26 10:43:18 -04:00
Barış Soner Uşaklı
d9a16855d0 refactor: posts api 2020-10-17 22:59:12 -04:00
Barış Soner Uşaklı
bc880ee0ca refactor: remove sockets.reqFromSocket 2020-10-16 21:05:00 -04:00
Julian Lam
40598b368e refactor: topic creation to use api lib 2020-10-16 11:01:18 -04:00
Julian Lam
ede9435f0e feat: send 401 for invalid-uid 2020-10-16 11:01:18 -04:00
Julian Lam
14f9d8b0e5 feat: send back 403 on no-privileges error 2020-10-15 20:23:19 -04:00
Julian Lam
4c833d0bf0 feat(writeapi): topic posting and replying 2020-10-08 15:33:10 -04:00
Julian Lam
e942ad8101 feat: added PUT /api/v1/categories/:cid route
Deprecated admin.categories.update socket call
Showing stack trace in console for errors, when in development mode
2020-10-08 15:33:10 -04:00
Julian Lam
a1ddc210b2 feat: added DELETE /api/v1/users/:uid and DELETE /api/v1/users 2020-10-08 15:33:10 -04:00
Julian Lam
f6433ef2c5 fix(refactor): merging write-api auth middlewares with core middlewares 2020-10-08 15:33:10 -04:00
Julian Lam
ec5c48b188 feat: migrating write-api skeleton into core 2020-10-08 15:33:10 -04:00
Barış Soner Uşaklı
fbd85680fb fix: spec 2020-10-02 16:57:26 -04:00
Barış Soner Uşaklı
5d9a868142 feat: category filter on post queue (#8710)
* feat: category filter on post queue

category filter module

* feat: add spec
2020-10-02 16:35:20 -04:00
Barış Soner Uşaklı
de824007d9 feat: allow custom req.query.filter on /unread /recent 2020-09-13 19:41:39 -04:00
Julian Lam
9e3fd0e479 Revert "feat: #8493, plugin helper for standardised link/button injection"
This reverts commit 0bbb813e4b.
2020-08-07 12:25:17 -04:00
Sam Thompson
0bbb813e4b feat: #8493, plugin helper for standardised link/button injection 2020-08-07 11:48:04 -04:00
Julian Lam
68f8d6e3a1 fix: #8549 send 308 Permanent Redirect on topic/category shortlinks 2020-08-06 10:49:15 -04:00
Barış Soner Uşaklı
658dd03b03 feat: add tools to recent/unread (#8477)
* feat: add tools to recent/unread

* fix: open api spec

* fix: more api spec
2020-07-08 14:09:10 -04:00
Barış Soner Uşaklı
eb9704f85e feat: #8450, next/prev link tags on /unread /recent 2020-06-30 11:34:32 -04:00
Barış Soner Uşaklı
842b8abb84 feat: add buildHeaderAsync (#8367)
* feat: add buildHeaderAsync

make helphers.notAllowed async

* fix: remove csrf from buildHeader

* fix: remove unused method, use middleware

* fix: /post/pid redirect doesn't need buildHeader

use buildHeaderAsync
2020-06-04 01:14:46 -04:00
Barış Soner Uşaklı
c47a1c4df4 fix: convert cids to string for comparison 2020-05-12 14:57:37 -04:00