Commit d151591c authored by Lynn Foster's avatar Lynn Foster
Browse files

Place/Location mutation working

parent 1aa83337
......@@ -55,14 +55,14 @@ class CreatePlace(AuthedMutation):
name=name,
address=address,
latitude=latitude,
notes=note,
description=note,
longitude=longitude,
)
user_agent = AgentUser.objects.get(user=context.user).agent
is_authorized = true #user_agent.is_authorized(object_to_mutate=place)
#user_agent = AgentUser.objects.get(user=context.user).agent
is_authorized = True #user_agent.is_authorized(object_to_mutate=place)
if is_authorized:
process.save()
place.save()
else:
raise PermissionDenied('User not authorized to perform this action.')
......
......@@ -3614,4 +3614,17 @@ mutation ($token: String!) {
}
}
mutation ($token: String!) {
createPlace(token: $token, name:"testloc2", note:"test", address:"123 some street", latitude: 54.333, longitude: 45.333) {
place {
id
name
address
latitude
longitude
note
}
}
}
'''
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment