Updated docs and fixed settings api key issue

doc_update
Joey Hines 2019-01-06 15:23:54 -06:00
parent 65a594e876
commit fd422657d0
2 changed files with 5 additions and 2 deletions

View File

@ -420,7 +420,8 @@ def restock(item_name, shop_name=None, discord_uuid=None, mc_uuid=None):
:param shop_name: Shop the item is in, can be none if the only one location is owned by the user
:param discord_uuid: Discord UUID
:param mc_uuid: Minecraft UUID
:return:
:return: List of items updated
:help: Restocks items matching the item name in your shop
'''
owner = get_player(discord_uuid, mc_uuid)
shop = get_location(owner, shop_name, Shop)
@ -430,3 +431,5 @@ def restock(item_name, shop_name=None, discord_uuid=None, mc_uuid=None):
for item in items:
item.date_restocked = datetime.datetime.now()
item.save()
return objects_list_to_json(items)

View File

@ -61,7 +61,7 @@ class CommandAPI(View):
class SettingsAPI(View):
def get(self, request):
if check_token(request, command_perm=True):
if check_token(request.GET, commands_perm=True):
response = {
"BOT_PREFIX": getattr(settings, 'GEOFFREY_BOT_PREFIX', '?'),
"ERROR_USERS": getattr(settings, 'GEOFFREY__BOT_ERROR_USERS', []),