Ghost/core/test/functional/api/v2/admin
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
..
integrations_spec.js Added HTTP BREAD for integrations resource (#9985) 2018-10-18 14:03:56 +01:00
invites_spec.js Added invites ctrl to v2 2018-10-12 21:13:20 +02:00
mail_spec.js Added mail ctrl to v2 2018-10-12 21:13:20 +02:00
notifications_spec.js Added notifications ctrl to v2 2018-10-12 21:13:20 +02:00
oembed_spec.js Added oembed controller to v2 api (#10057) 2018-11-02 09:32:26 +01:00
posts_spec.js Content API v2 date formatting (#10095) 2018-11-06 16:12:12 +01:00
roles_spec.js Migrated roles controller to API v2 2018-10-10 16:48:22 +02:00
settings_spec.js Added settings ctrl to v2 2018-10-12 21:13:20 +02:00
slack_spec.js 🐛 Fix last seen for users (#10141) 2018-11-13 18:27:10 +07:00
slugs_spec.js Added v2 controller for slugs (#9978) 2018-10-12 17:55:20 +05:30
subscribers_spec.js 🐛 Fixed missing filename when exporting subscribers csv 2018-10-27 18:39:39 +02:00
tags_spec.js 🐛 Fixed pagination/duplicate posts and users appearing in admin area (#10031) 2018-10-18 10:05:51 +01:00
upload_spec.js Added upload controller to v1 (#9997) 2018-10-12 22:41:39 +02:00
users_spec.js 🐛 Fixed pagination/duplicate posts and users appearing in admin area (#10031) 2018-10-18 10:05:51 +01:00
utils.js Added doAuth v2 admin api test helper (#9964) 2018-10-09 10:24:41 +07:00
webhooks_spec.js Added edit webhook route to v2 Admin API (#10033) 2018-10-19 18:35:55 +01:00