Severity and Markdown support in MOTD

[Delivers #133555165]
This commit is contained in:
Joseph Schorr 2017-01-17 16:41:24 -05:00
parent 0f203b01d3
commit 3106504f39
13 changed files with 234 additions and 36 deletions

View file

@ -35,6 +35,16 @@ class GlobalUserMessages(ApiResource):
'type': 'string',
'description': 'The actual message',
},
'media_type': {
'type': 'string',
'description': 'The media type of the message',
'enum': ['text/plain', 'text/markdown'],
},
'severity': {
'type': 'string',
'description': 'The severity of the message',
'enum': ['info', 'warning', 'error'],
},
},
},
},
@ -53,6 +63,16 @@ class GlobalUserMessages(ApiResource):
'type': 'string',
'description': 'The actual message',
},
'media_type': {
'type': 'string',
'description': 'The media type of the message',
'enum': ['text/plain', 'text/markdown'],
},
'severity': {
'type': 'string',
'description': 'The severity of the message',
'enum': ['info', 'warning', 'error'],
},
},
},
},
@ -104,4 +124,6 @@ def message_view(message):
return {
'uuid': message.uuid,
'content': message.content,
'severity': message.severity,
'media_type': message.media_type.name,
}