Skip to content

Commit

Permalink
Merge pull request #282 from EATSTEAK/dev
Browse files Browse the repository at this point in the history
0.10.3
  • Loading branch information
Twince authored Sep 11, 2022
2 parents d823d51 + a5f2a65 commit bde33e7
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lockerweb",
"version": "0.10.2",
"version": "0.10.3",
"description": "SSU IT Collage Locker system.",
"private": true,
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "client",
"version": "0.10.2",
"version": "0.10.3",
"scripts": {
"dev": "cross-env VITE_BASE_URL=http://localhost:3000 vite dev --port 5002 --host 0.0.0.0",
"build": "vite build",
Expand Down
2 changes: 1 addition & 1 deletion packages/server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "server",
"version": "0.10.2",
"version": "0.10.3",
"description": "Backend Lambda script for lockerweb",
"license": "MIT",
"scripts": {
Expand Down
8 changes: 6 additions & 2 deletions packages/server/src/locker/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ export const claimLocker = async function (
TableName,
Key: { type: { S: 'user' }, id: { S: id } },
UpdateExpression: 'SET #lockerId = :lockerId, cU = :claimedUntil',
ConditionExpression: `#aT = :token${condition ? ` AND ((${condition}) OR iA = :true)` : ''}`,
ConditionExpression: `#aT = :token${
id !== adminId && condition ? ` AND ((${condition}) OR iA = :true)` : ''
}`,
ExpressionAttributeNames: {
'#lockerId': 'lockerId',
'#aT': 'aT'
Expand Down Expand Up @@ -91,7 +93,9 @@ export const unclaimLocker = async function (
TableName,
Key: { type: { S: 'user' }, id: { S: id } },
UpdateExpression: 'REMOVE #lockerId',
ConditionExpression: `#aT = :token ${condition ? ` AND ((${condition}) OR iA = :true)` : ''}`,
ConditionExpression: `#aT = :token ${
id !== adminId && condition ? ` AND ((${condition}) OR iA = :true)` : ''
}`,
ExpressionAttributeNames: {
'#lockerId': 'lockerId',
'#aT': 'aT'
Expand Down
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@types/lockerweb",
"version": "0.10.2",
"version": "0.10.3",
"types": "index.d.ts",
"license": "MIT",
"dependencies": {
Expand Down

0 comments on commit bde33e7

Please sign in to comment.