2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00
Ghost/core/server/web/shared/middlewares
Fabien O'Carroll 8046f4d437
🐛 Fix last seen for users (#10141)
* Added updateLastSeen method to user model

refs #10138

* Refactor codebase to use user.updateLastSeen

refs #10138

This is to ensure all updates go via the same method, meaning any
specific logic can be handled in one place, it also helps with grepping
the codebase to find where this occurs

* Created updateUserLastSeen middleware for v2 admin

refs #10138

This is intended to be used with the v2 admin api and _possibly_ the
content api, to give us an accruate report on thelast time a user access
a ghost instance.

* Wired updateUserLastSeen up to v2 Admin API

closes #10138

* Fixed broken test for v2 admin api

no-issue

This test was broken because it was incorrectly testing for a method to
be called exactly once - this was irrelevant to the functionality being
tested for.

* Updated user check method to set status to active

no-issue

* Debounced the updateUserLastSeen middlware an hour

no-issue

* Resolved some PR comments
2018-11-13 18:27:10 +07:00
..
api Refactored how we require shared middlewares from web/ (#9893) 2018-09-21 16:17:11 +05:30
image Refactored web/middleware and web/utils to web/shared (#9892) 2018-09-20 20:04:34 +02:00
validation Added new endpoint to upload square profile images with dimension validation (#9862) 2018-09-24 21:42:58 +02:00
admin-redirects.js Refactored web/middleware and web/utils to web/shared (#9892) 2018-09-20 20:04:34 +02:00
brute.js Refactored web/middleware and web/utils to web/shared (#9892) 2018-09-20 20:04:34 +02:00
cache-control.js Refactored web/middleware and web/utils to web/shared (#9892) 2018-09-20 20:04:34 +02:00
custom-redirects.js Optimised web/ debug logs 2018-10-04 17:43:08 +02:00
emit-events.js Added new site.changed event and webhook trigger service (#10019) 2018-10-19 00:01:30 +05:30
error-handler.js Refactored web/middleware and web/utils to web/shared (#9892) 2018-09-20 20:04:34 +02:00
frontend-client.js Updated blog site components to respect the api version 2018-10-18 19:41:07 +02:00
ghost-locals.js Attached api version to res.locals context 2018-10-18 19:41:07 +02:00
index.js 🐛 Fix last seen for users (#10141) 2018-11-13 18:27:10 +07:00
labs.js Refactored web/middleware and web/utils to web/shared (#9892) 2018-09-20 20:04:34 +02:00
log-request.js Refactored web/middleware and web/utils to web/shared (#9892) 2018-09-20 20:04:34 +02:00
maintenance.js Refactored web/middleware and web/utils to web/shared (#9892) 2018-09-20 20:04:34 +02:00
pretty-urls.js Refactored web/middleware and web/utils to web/shared (#9892) 2018-09-20 20:04:34 +02:00
serve-favicon.js Refactored web/middleware and web/utils to web/shared (#9892) 2018-09-20 20:04:34 +02:00
serve-public-file.js Refactored method urlFor to use versionType instead of admin: true 2018-10-04 16:49:55 +05:30
static-theme.js Refactored web/middleware and web/utils to web/shared (#9892) 2018-09-20 20:04:34 +02:00
uncapitalise.js Extended uncapitalise unit tests (#9891) 2018-09-20 22:27:38 +02:00
update-user-last-seen.js 🐛 Fix last seen for users (#10141) 2018-11-13 18:27:10 +07:00
url-redirects.js Optimised web/ debug logs 2018-10-04 17:43:08 +02:00