Skip to content

Commit 0b1219b

Browse files
authored
Restyle signature authorisation added for demon request (#22)
Restyle signature authorisation added for demon request
2 parents 2efef0a + 373ca56 commit 0b1219b

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

metering/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ class OrgServiceConfigModel(Base):
1414
free_calls = Column('free_calls', Integer, nullable=False)
1515
effective_start_date = Column(
1616
'effective_start_date', TIMESTAMP(timezone=True))
17-
effective_end_date = Column('effective_end_date', TIMESTAMP(
17+
effective_end_date = Column('effective_end_date', TIMESTAMP(timezone=True))
18+
created_at = Column('created_at', TIMESTAMP(
1819
timezone=True), server_default=func.current_timestamp())
19-
created_at = Column('created_at', TIMESTAMP(timezone=True))
2020

2121

2222
class UserOrgGroupModel(Base):

metering/serverless.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ functions:
8585
- http:
8686
path: /usage
8787
method: post
88+
authorizer:
89+
type: request
90+
arn: ${file(./config.${self:provider.stage}.json):SIGN_AUTHORIZER}
91+
identitySource: ${file(./config.${self:provider.stage}.json):SIGN_HEADERS}
8892
cors:
8993
origin: ${self:custom.origin.${self:provider.stage}}
9094
headers:

metering/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import logging
22

33

4-
def make_response(status_code, body, header=None, ):
4+
def make_response(status_code, body, header=None):
55
return {
66
"statusCode": status_code,
77
"headers": header,

0 commit comments

Comments
 (0)