mirror of
https://github.com/Dadechin/Dashboard-XRoom.git
synced 2025-07-04 09:14:34 +00:00
Compare commits
3 Commits
23a765c861
...
0d4c208ecd
Author | SHA1 | Date | |
---|---|---|---|
0d4c208ecd | |||
0b05e13be8 | |||
4d2abc8f9a |
|
@ -5,4 +5,4 @@ from core.models.AssetBundleRoom import AssetBundleRoom
|
|||
class AssetBundleRoomSerializer(serializers.ModelSerializer):
|
||||
class Meta:
|
||||
model = AssetBundleRoom
|
||||
fields = ['id', 'name', 'description' , 'img','url'] # Include the fields you want to return
|
||||
fields = ['id', 'name', 'description' , 'img','url' , 'Private' , 'maxPerson'] # Include the fields you want to return
|
||||
|
|
|
@ -16,8 +16,9 @@ def getAssignedAssetBundleRooms(request):
|
|||
assigned_rooms = AssignRoomUser.objects.filter(user=request.user).values_list('assetbundle_room', flat=True)
|
||||
|
||||
# Fetch all AssetBundleRoom objects that the user is assigned to
|
||||
rooms = AssetBundleRoom.objects.filter(id__in=assigned_rooms)
|
||||
|
||||
# rooms = AssetBundleRoom.objects.filter(id__in=assigned_rooms or Private=False)
|
||||
rooms = AssetBundleRoom.objects.filter(id__in=assigned_rooms ) | AssetBundleRoom.objects.filter(Private=False )
|
||||
|
||||
# Serialize the rooms
|
||||
serializer = AssetBundleRoomSerializer(rooms, many=True)
|
||||
|
||||
|
|
121
testServer.rest
Normal file
121
testServer.rest
Normal file
|
@ -0,0 +1,121 @@
|
|||
# https://marketplace.visualstudio.com/items?itemName=humao.rest-client
|
||||
|
||||
POST http://my.xroomapp.com:8000/signup
|
||||
Content-Type: application/json
|
||||
|
||||
{ "username": "09140086509", "password": "12345678", "email": "adam2@mail.com" , "mobile_number":"09140086509" }
|
||||
|
||||
###
|
||||
|
||||
POST http://my.xroomapp.com:8000/login
|
||||
Content-Type: application/json
|
||||
|
||||
{ "mobile_number":"09140086509", "password": "13245678" }
|
||||
|
||||
###
|
||||
|
||||
POST http://my.xroomapp.com:8000/login
|
||||
Content-Type: application/json
|
||||
|
||||
{ "password": "12345678" }
|
||||
|
||||
###
|
||||
|
||||
GET http://my.xroomapp.com:8000/sendSmsVerification
|
||||
Content-Type: application/json
|
||||
Authorization: token 224648840820ad0948ddee5b00d53ae67c040c49
|
||||
|
||||
###
|
||||
|
||||
POST http://my.xroomapp.com:8000/submitSmsVerification
|
||||
Content-Type: application/json
|
||||
Authorization: token d3f1b03996140c8f7561d67221953ff704b482cb
|
||||
|
||||
{ "verification_sms_code": "807806" }
|
||||
|
||||
###
|
||||
|
||||
GET http://my.xroomapp.com:8000/test_token
|
||||
Content-Type: application/json
|
||||
Authorization: token 8dcae0063521ca707a9d0ab6ce3d4794a90064ca
|
||||
# Authorization: token 53e2b003a92e22aca85c95088a438ece8d9a5dfb
|
||||
|
||||
|
||||
###
|
||||
|
||||
GET http://my.xroomapp.com:8000/getInfo
|
||||
Content-Type: application/json
|
||||
Authorization: token 8dcae0063521ca707a9d0ab6ce3d4794a90064ca
|
||||
# Authorization: token 53e2b003a92e22aca85c95088a438ece8d9a5dfb
|
||||
|
||||
|
||||
###
|
||||
GET http://my.xroomapp.com:8000/templatequestions
|
||||
Content-Type: application/json
|
||||
Authorization: token c362581117e209735d412226e54596867e370892
|
||||
|
||||
|
||||
###
|
||||
GET http://my.xroomapp.com:8000/templatequestionscgm
|
||||
Content-Type: application/json
|
||||
Authorization: token c362581117e209735d412226e54596867e370892
|
||||
|
||||
|
||||
###
|
||||
GET http://my.xroomapp.com:8000/templatepages
|
||||
Content-Type: application/json
|
||||
Authorization: token c362581117e209735d412226e54596867e370892
|
||||
|
||||
|
||||
###
|
||||
|
||||
POST http://my.xroomapp.com:8000/savetemplateform
|
||||
Content-Type: application/json
|
||||
Authorization: token c362581117e209735d412226e54596867e370892
|
||||
|
||||
{ "question_id": "1", "answer_text": "answer1" }
|
||||
|
||||
###
|
||||
|
||||
|
||||
###
|
||||
|
||||
POST http://my.xroomapp.com:8000/editProfile
|
||||
Content-Type: application/json
|
||||
Authorization: token d3f1b03996140c8f7561d67221953ff704b482cb
|
||||
|
||||
{ "verification_sms_code": "807806" }
|
||||
|
||||
|
||||
###
|
||||
|
||||
POST http://my.xroomapp.com:8000/add_teamMember
|
||||
Content-Type: application/json
|
||||
Authorization: token 8dcae0063521ca707a9d0ab6ce3d4794a90064ca
|
||||
|
||||
{ "mobile_number": "09140086608", "first_name":"mahdi", "last_name":"arabi", "semat":"modir", "password": "12345678", "isAdmin":"true" }
|
||||
|
||||
|
||||
|
||||
|
||||
###
|
||||
|
||||
POST http://my.xroomapp.com:8000/add_space
|
||||
Content-Type: application/json
|
||||
Authorization: token 8dcae0063521ca707a9d0ab6ce3d4794a90064ca
|
||||
|
||||
{ "assetBundleRoomId": "1", "name":"ROOM1", "description":"TEST DES", "capacity": "12" }
|
||||
|
||||
|
||||
|
||||
###
|
||||
GET http://my.xroomapp.com:8000/get_space
|
||||
Content-Type: application/json
|
||||
Authorization: token a6e1d5db61c4e8b2a0a4c0b623915e3b3a68df40
|
||||
|
||||
|
||||
###
|
||||
GET http://my.xroomapp.com:8000/get_assigned_assetbundle_rooms
|
||||
Content-Type: application/json
|
||||
Authorization: token a6e1d5db61c4e8b2a0a4c0b623915e3b3a68df40
|
||||
|
Loading…
Reference in New Issue
Block a user