update
This commit is contained in:
@@ -148,7 +148,7 @@ def enroll(
|
||||
ttl_expiration = ttl(start_dt=now_, days=course.access_period - offset_days)
|
||||
transact.put(
|
||||
item={
|
||||
'id': 'lock',
|
||||
'id': 'LOCK',
|
||||
'sk': lock_hash,
|
||||
'enrollment_id': enrollment.id,
|
||||
'created_at': now_,
|
||||
@@ -160,7 +160,7 @@ def enroll(
|
||||
transact.put(
|
||||
item={
|
||||
'id': enrollment.id,
|
||||
'sk': 'lock',
|
||||
'sk': 'LOCK',
|
||||
'hash': lock_hash,
|
||||
'created_at': now_,
|
||||
'ttl': ttl_expiration,
|
||||
@@ -170,14 +170,14 @@ def enroll(
|
||||
transact.put(
|
||||
item={
|
||||
'id': enrollment.id,
|
||||
'sk': 'metadata#deduplication_window',
|
||||
'sk': 'METADATA#DEDUPLICATION_WINDOW',
|
||||
'offset_days': offset_days,
|
||||
'created_at': now_,
|
||||
},
|
||||
)
|
||||
else:
|
||||
transact.condition(
|
||||
key=KeyPair('lock', lock_hash),
|
||||
key=KeyPair('LOCK', lock_hash),
|
||||
cond_expr='attribute_not_exists(sk)',
|
||||
exc_cls=DeduplicationConflictError,
|
||||
)
|
||||
|
||||
@@ -30,12 +30,6 @@ export async function loader({ request, context }: Route.LoaderArgs) {
|
||||
redirect: 'manual'
|
||||
})
|
||||
|
||||
console.log('Issuer response', {
|
||||
json: await r.json(),
|
||||
headers: r.headers,
|
||||
status: r.status
|
||||
})
|
||||
|
||||
if (r.status === httpStatus.FOUND) {
|
||||
return new Response(await r.text(), {
|
||||
status: r.status,
|
||||
@@ -43,6 +37,12 @@ export async function loader({ request, context }: Route.LoaderArgs) {
|
||||
})
|
||||
}
|
||||
|
||||
console.log('Issuer response', {
|
||||
json: await r.json(),
|
||||
headers: r.headers,
|
||||
status: r.status
|
||||
})
|
||||
|
||||
// Deny authorization if user lacks scopes requested by client
|
||||
if (r.status === httpStatus.FORBIDDEN) {
|
||||
return new Response(null, {
|
||||
|
||||
Reference in New Issue
Block a user