You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expect the new Journal entry to show up in the web UI.
Environment
Your own self-hosted instance (monica v4)
Version of Monica
4.1.2
Installation method
Docker image
Web server
Apache
Database engine version
MariaDB
Additional info
The following SQL fixes the issue, although I did not look into the implications of editing the DB like this.
INSERT INTO journal_entries (account_id, date, journalable_id, journalable_type, created_at, updated_at)
SELECT 1, entries.created_at, entries.id, "App\\Models\\Journal\\Entry", entries.created_at, entries.updated_at
FROM entries
WHERE NOT EXISTS (
SELECT 1 -- I am a single user instance, so I have user id of `1`, substitute for yours
FROM journal_entries
WHERE journal_entries.journalable_id = entries.id
);
The text was updated successfully, but these errors were encountered:
Bug description
Journal Entries Created with API not showing in web UI
Steps to reproduce
curl -X POST https://monica.example.com/api/journal -H $AuthBearerToken --data '{"title": "test", "post": "test"}' --header "Content-Type: application/json"
curl -X GET https://monica.example.com/api/journal/$id -H $AuthBearerToken
# This returns the data correctlyExpected behavior
I expect the new Journal entry to show up in the web UI.
Environment
Your own self-hosted instance (monica v4)
Version of Monica
4.1.2
Installation method
Docker image
Web server
Apache
Database engine version
MariaDB
Additional info
The following SQL fixes the issue, although I did not look into the implications of editing the DB like this.
The text was updated successfully, but these errors were encountered: