Welcome Tour: Update the user model #5171
Labels
good first issue
[triage] Start here if you've never contributed before.
server / core
Issues relating to the server or core of Ghost
This issue is part of the welcome tour feature and should be implemented behind a config flag (not labs) to start with. An example of how to do this exists in this PR.
Description:
On the server side, the user model should get a single additional field which stores a JSON object containing each tour item and whether or not it is seen. This data will be passed via the User API as per usual, such that Ember always knows the state of the currently logged in user's tour.
Spec:
The user model needs a new field added to it. Recommended name is
tour
, and it should have the same type and maxlength asvalue
in the settings table. Thetour
field should be nullable and not have a default value, tour items will appear there when they have some data to persist (see #).Adding new columns to our database schema in
schema.js
means we need to ensure that a migration is triggered. This means we also need to bump our database version indefault-settings.json
and update the hashes in the tests that check this doesn't change.It will also be necessary to update several API tests and other locations to ensure that the API knows about and properly handles the new
tour
field.Note: it would be ideal to bundle the additional post field needed for the preview feature into this database migration.
The result of this issue should be the new
tour
field being provided via the User API.The text was updated successfully, but these errors were encountered: