Ghost/core/server/web/api
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
..
v0.1 Optimised web/ debug logs 2018-10-04 17:43:08 +02:00
v2 🐛 Fix last seen for users (#10141) 2018-11-13 18:27:10 +07:00
README.md Added v2 api endpoints (#9874) 2018-09-18 15:59:06 +02:00

Ghost APIs

Ghost is moving towards providing more robust APIs in the future. A plan and decisions can be found here.

WARNING!

The v2 API (/ghost/api/v2/* endpoints) is to be considered under active development until this message is removed. Please use with caution and don't rely too heavy on it just yet :)