Skip to content

Commit 712862e

Browse files
Merge pull request #17 from JohnRamberger/development
Development
2 parents 8383e29 + 419bad8 commit 712862e

File tree

22 files changed

+1529
-142
lines changed

22 files changed

+1529
-142
lines changed

amplify/backend/api/hacklyticsportal2023/schema.graphql

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ type Query {
6464
getUserById(user_uuid: String): String
6565
@function(name: "hacklyticsportal20232e32fd51-${env}")
6666
listUsers: String @function(name: "hacklyticsportal2023listusers-${env}")
67+
getUserByName(userName: String):String
68+
@function(name: "hacklyticsportalGetUserByName-${env}")
6769
}
6870

6971
type Points
@@ -136,3 +138,40 @@ type EventRSVP
136138
userName: String!
137139
eventID: String!
138140
}
141+
142+
type Log
143+
@model
144+
@auth(
145+
rules: [
146+
{
147+
allow: groups
148+
groups: ["Administrator"]
149+
operations: [read, create, update, delete]
150+
}
151+
{ allow: private, operations: [read, create] }
152+
]
153+
) {
154+
id: ID!
155+
userID: String!
156+
userName: String!
157+
type: String!
158+
message: String!
159+
timestamp: AWSDateTime!
160+
}
161+
162+
type ClaimShirt
163+
@model
164+
@auth(
165+
rules: [
166+
{
167+
allow: groups
168+
groups: ["Administrator"]
169+
operations: [read, create, update, delete]
170+
}
171+
{ allow: private, operations: [read, create] }
172+
]
173+
) {
174+
id: ID!
175+
userID: String!
176+
userName: String!
177+
}

amplify/backend/backend-config.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,20 @@
9595
],
9696
"providerPlugin": "awscloudformation",
9797
"service": "Lambda"
98+
},
99+
"hacklyticsportalGetUserByName": {
100+
"build": true,
101+
"dependsOn": [
102+
{
103+
"attributes": [
104+
"UserPoolId"
105+
],
106+
"category": "auth",
107+
"resourceName": "hacklyticsportal2023"
108+
}
109+
],
110+
"providerPlugin": "awscloudformation",
111+
"service": "Lambda"
98112
}
99113
},
100114
"parameters": {
@@ -129,6 +143,22 @@
129143
"resourceName": "hacklyticsportal2023listusers"
130144
}
131145
]
146+
},
147+
"AMPLIFY_function_hacklyticsportalGetUserByName_deploymentBucketName": {
148+
"usedBy": [
149+
{
150+
"category": "function",
151+
"resourceName": "hacklyticsportalGetUserByName"
152+
}
153+
]
154+
},
155+
"AMPLIFY_function_hacklyticsportalGetUserByName_s3Key": {
156+
"usedBy": [
157+
{
158+
"category": "function",
159+
"resourceName": "hacklyticsportalGetUserByName"
160+
}
161+
]
132162
}
133163
},
134164
"storage": {

amplify/backend/function/hacklyticsportal2023listusers/src/index.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,14 @@ exports.handler = async (event) => {
3434
});
3535
var users = x.Users;
3636
if (users.length > 0) {
37-
users = users.map((user) => {
38-
return {
39-
username: user.Username,
40-
email: user.Attributes.find((attr) => attr.Name === "email").Value,
41-
name: user.Attributes.find((attr) => attr.Name === "name").Value,
42-
enabled: user.Enabled,
43-
};
44-
});
4537
return JSON.stringify({
4638
statusCode: 200,
4739
// Uncomment below to enable CORS requests
4840
// headers: {
4941
// "Access-Control-Allow-Origin": "*",
5042
// "Access-Control-Allow-Headers": "*"
5143
// },
52-
body: { ok: 1, userCount: users.length, users: users },
44+
body: { ok: 1, users: users },
5345
});
5446
} else {
5547
return JSON.stringify({

amplify/backend/function/hacklyticsportal2023listusers/src/yarn.lock

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
# yarn lockfile v1
33

44

5+
"@types/aws-lambda@^8.10.92":
6+
version "8.10.110"
7+
resolved "https://registry.yarnpkg.com/@types/aws-lambda/-/aws-lambda-8.10.110.tgz#32a1f9d40b855d69830243492bbb6408098f4c88"
8+
integrity sha512-r6egf2Cwv/JaFTTrF9OXFVUB3j/SXTgM9BwrlbBRjWAa2Tu6GWoDoLflppAZ8uSfbUJdXvC7Br3DjuN9pQ2NUQ==
9+
510
available-typed-arrays@^1.0.5:
611
version "1.0.5"
712
resolved "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz"
@@ -97,7 +102,7 @@ has@^1.0.3:
97102
dependencies:
98103
function-bind "^1.1.1"
99104

100-
ieee754@^1.1.4, [email protected].13:
105+
[email protected].13, ieee754@^1.1.4:
101106
version "1.1.13"
102107
resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz"
103108
integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==
@@ -158,7 +163,7 @@ [email protected]:
158163
resolved "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz"
159164
integrity sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==
160165

161-
sax@>=0.6.0, sax@1.2.1:
166+
sax@1.2.1, sax@>=0.6.0:
162167
version "1.2.1"
163168
resolved "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz"
164169
integrity sha512-8I2a3LovHTOpm7NV5yOyO8IHqgVsfK4+UuySrXU8YXkSRX7k6hCV9b3HrkKCr3nMpgj+0bmocaJJWpvp1oc7ZA==
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"pluginId": "amplify-nodejs-function-runtime-provider",
3+
"functionRuntime": "nodejs",
4+
"useLegacyBuild": true,
5+
"defaultEditorFile": "src\\index.js"
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[
2+
{
3+
"Action": [],
4+
"Resource": []
5+
}
6+
]
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"lambdaLayers": [],
3+
"permissions": {
4+
"auth": {
5+
"hacklyticsportal2023": [
6+
"read"
7+
]
8+
}
9+
}
10+
}

0 commit comments

Comments
 (0)