(requestContext)
| 9 | const NANO_ID_CODE_LENGTH = process.env.CodeLength |
| 10 | |
| 11 | const isAdmin = (requestContext) => { |
| 12 | try { |
| 13 | const groups = requestContext.authorizer.claims['cognito:groups'].replace('[','').replace(']','').split(',') |
| 14 | return groups.includes('admin') |
| 15 | } catch (err) { |
| 16 | return false |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | // Returns details of a Place ID where the app has user-generated content. |
| 21 | exports.handler = async (event) => { |