Resolves #160 (tests to be fixed in additional commit minutes from now).
This commit is contained in:
committed by
Just van den Broecke
parent
9babfff9cf
commit
36d7b00f80
+14
-14
@@ -310,20 +310,20 @@ class API(object):
|
||||
|
||||
fcm['collections'].append(collection)
|
||||
|
||||
fcm['links'].append({
|
||||
'type': 'application/json',
|
||||
'rel': 'self',
|
||||
'title': 'This document as JSON',
|
||||
'href': '{}/collections?f=json'.format(
|
||||
self.config['server']['url'])
|
||||
})
|
||||
fcm['links'].append({
|
||||
'type': 'text/html',
|
||||
'rel': 'alternate',
|
||||
'title': 'This document as HTML',
|
||||
'href': '{}/collections?f=html'.format(
|
||||
self.config['server']['url'])
|
||||
})
|
||||
fcm['links'].append({
|
||||
'type': 'application/json',
|
||||
'rel': 'self',
|
||||
'title': 'This document as JSON',
|
||||
'href': '{}/collections?f=json'.format(
|
||||
self.config['server']['url'])
|
||||
})
|
||||
fcm['links'].append({
|
||||
'type': 'text/html',
|
||||
'rel': 'alternate',
|
||||
'title': 'This document as HTML',
|
||||
'href': '{}/collections?f=html'.format(
|
||||
self.config['server']['url'])
|
||||
})
|
||||
|
||||
if format_ == 'html': # render
|
||||
fcm['links'][0]['rel'] = 'alternate'
|
||||
|
||||
Reference in New Issue
Block a user