add add item api
This commit is contained in:
parent
30f61d0ed5
commit
8734e35613
2 changed files with 36 additions and 2 deletions
|
|
@ -187,7 +187,7 @@ def addFile(request):
|
|||
response = json_response({})
|
||||
data = json.loads(request.POST['data'])
|
||||
oshash = data.pop('id')
|
||||
if not request.user.get_profile().capability('canUploadVideo'):
|
||||
if not request.user.get_profile().capability('canAddItems'):
|
||||
response = json_response(status=403, text='permissino denied')
|
||||
elif models.File.objects.filter(oshash=oshash).count() > 0:
|
||||
f = models.File.objects.get(oshash=oshash)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue