mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 14:52:15 +00:00
Switch to oldstyle Optimer API endpoint
This commit is contained in:
@@ -37,10 +37,7 @@ class OAuthOpTimerHandler(BaseHandler):
|
|||||||
|
|
||||||
def read(self, request, id=None):
|
def read(self, request, id=None):
|
||||||
|
|
||||||
objs = EVEAccount.objects.filter(user=request.user, api_keytype=API_KEYTYPE_FULL)
|
objs = [get_object_or_404(EVEAccount, pk=settings.FULL_API_USER_ID)]
|
||||||
|
|
||||||
if not objs.count():
|
|
||||||
objs = [get_object_or_404(EVEAccount, pk=settings.FULL_API_USER_ID)]
|
|
||||||
|
|
||||||
events = []
|
events = []
|
||||||
for obj in objs:
|
for obj in objs:
|
||||||
@@ -93,12 +90,12 @@ class OAuthOpTimerHandler(BaseHandler):
|
|||||||
if len(events) == 0:
|
if len(events) == 0:
|
||||||
return {'ops':[{
|
return {'ops':[{
|
||||||
'startsIn': -1,
|
'startsIn': -1,
|
||||||
'eventID': 0,
|
'eventID': '0',
|
||||||
'ownerName': '',
|
'ownerName': '',
|
||||||
'eventDate': '',
|
'eventDate': '',
|
||||||
'eventTitle': '<div style="text-align:center">No ops are currently scheduled</div>',
|
'eventTitle': '<div style="text-align:center">No ops are currently scheduled</div>',
|
||||||
'duration': 0,
|
'duration': 0,
|
||||||
'isImportant': 0,
|
'isImportant': '0',
|
||||||
'eventText': 'Add ops using EVE-Gate or the in-game calendar',
|
'eventText': 'Add ops using EVE-Gate or the in-game calendar',
|
||||||
'endsIn':-1,
|
'endsIn':-1,
|
||||||
'forumLink': ''}]}
|
'forumLink': ''}]}
|
||||||
|
|||||||
Reference in New Issue
Block a user