2021-11-29 08:37:52 +01:00
|
|
|
from ... import acl
|
|
|
|
from halfapi.logging import logger
|
|
|
|
|
|
|
|
ACLS = {
|
|
|
|
'GET' : [
|
|
|
|
{
|
|
|
|
'acl':acl.public,
|
|
|
|
'args': {
|
|
|
|
'required': {
|
|
|
|
'foo', 'bar'
|
|
|
|
},
|
|
|
|
'optional': {
|
|
|
|
'x'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'acl':acl.random,
|
|
|
|
'args': {
|
|
|
|
'required': {
|
|
|
|
'foo', 'baz'
|
|
|
|
},
|
|
|
|
'optional': {
|
|
|
|
'truebidoo'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2021-12-13 12:40:40 +01:00
|
|
|
],
|
|
|
|
'POST' : [
|
|
|
|
{
|
|
|
|
'acl':acl.private,
|
|
|
|
'args': {
|
|
|
|
'required': {
|
|
|
|
'foo', 'bar'
|
|
|
|
},
|
|
|
|
'optional': {
|
|
|
|
'x'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'acl':acl.public,
|
|
|
|
'args': {
|
|
|
|
'required': {
|
|
|
|
'foo', 'baz'
|
|
|
|
},
|
|
|
|
'optional': {
|
|
|
|
'truebidoo'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2021-11-29 08:37:52 +01:00
|
|
|
]
|
2021-12-13 12:40:40 +01:00
|
|
|
|
2021-11-29 08:37:52 +01:00
|
|
|
}
|
|
|
|
|
2022-09-05 10:12:47 +02:00
|
|
|
def get(data):
|
2021-11-29 08:37:52 +01:00
|
|
|
"""
|
|
|
|
description:
|
2022-09-05 10:12:47 +02:00
|
|
|
returns the arguments passed in
|
2021-11-29 08:37:52 +01:00
|
|
|
"""
|
|
|
|
logger.error('%s', data['foo'])
|
2022-09-05 10:12:47 +02:00
|
|
|
return data
|
2021-12-13 12:40:40 +01:00
|
|
|
|
2022-09-05 10:12:47 +02:00
|
|
|
def post(data):
|
2021-12-13 12:40:40 +01:00
|
|
|
"""
|
|
|
|
description:
|
2022-09-05 10:12:47 +02:00
|
|
|
returns the arguments passed in
|
2021-12-13 12:40:40 +01:00
|
|
|
"""
|
|
|
|
logger.error('%s', data)
|
2022-09-05 10:12:47 +02:00
|
|
|
return data
|