Ghost/ghost/admin/app/serializers/post-revision.js
Ronald f37d7a3fc7 Wired up revision post status and reason to admin
no issue

We can now get post_status and reason in admin for each post_revision
object
2023-04-21 14:05:27 +01:00

18 lines
648 B
JavaScript

/* eslint-disable camelcase */
import ApplicationSerializer from 'ghost-admin/serializers/application';
import {EmbeddedRecordsMixin} from '@ember-data/serializer/rest';
export default class PostRevisionSerializer extends ApplicationSerializer.extend(EmbeddedRecordsMixin) {
// settings for the EmbeddedRecordsMixin.
attrs = {
author: {embedded: 'always'},
lexical: {key: 'lexical'},
title: {key: 'title'},
createdAt: {key: 'created_at'},
postIdLocal: {key: 'post_id'},
postStatus: {key: 'post_status'},
reason: {key: 'reason'},
featureImage: {key: 'feature_image'}
};
}