1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Ghost-Admin/app/serializers/notification.js
Kevin Ansfield 195bca322a 🐛 fix duplicate server alerts + default alert bg color (#242)
closes https://github.com/TryGhost/Ghost/issues/7305

The `location` property of server-side notifications was being ignored by the client and so wasn't being used to de-duplicate alerts.

- adds `key` attribute to `Notification` model
- adds a serializer for notifications that renames the `location` key sent by the server to `key`
- set the default background color of alerts to white so that alerts with no `type` set do not inherit the background color (useful in Ghost Desktop which has a transparent background color set)
2016-09-01 11:01:54 -05:00

8 lines
152 B
JavaScript

import ApplicationSerializer from './application';
export default ApplicationSerializer.extend({
attrs: {
key: {key: 'location'}
}
});