Nodes can now be shared with /nodes/<node_id>/share endpoint.

A POST will create a short link (if it doesn't exist already), whereas
a GET will return the short link for the node.

The endpoint will return a dict like:

{'short_code': 'XXXXXX',
 'short_link': 'https://blender.cloud/r/XXXXX',
 'theatre_link': 'https://blender.cloud/r/XXXXX?t'}
This commit is contained in:
2016-07-07 15:17:56 +02:00
parent 2bdfbaea13
commit 3f3e9ac7db
6 changed files with 219 additions and 6 deletions

View File

@@ -98,3 +98,6 @@ LOGGING = {
],
}
}
SHORT_LINK_BASE_URL = 'https://blender.cloud/r/'
SHORT_CODE_LENGTH = 6 # characters