dynamodb-admin
Advanced tools
Comparing version 1.9.2 to 1.10.0
35
index.js
@@ -93,2 +93,37 @@ const express = require('express') | ||
app.get('/tables/:TableName/get', (req, res, next) => { | ||
const TableName = req.params.TableName | ||
if (req.query.hash) { | ||
if (req.query.range) { | ||
return res.redirect(`/tables/${TableName}/items/${req.query.hash}${encodeURIComponent(',')}${req.query.range}`) | ||
} else { | ||
return res.redirect(`/tables/${TableName}/items/${req.query.hash}`) | ||
} | ||
} | ||
describeTable({TableName}).then((description) => { | ||
const hashKey = description.Table.KeySchema.find((schema) => { | ||
return schema.KeyType === 'HASH' | ||
}) | ||
if (hashKey) { | ||
hashKey.AttributeType = description.Table.AttributeDefinitions.find((definition) => { | ||
return definition.AttributeName === hashKey.AttributeName | ||
}).AttributeType | ||
} | ||
const rangeKey = description.Table.KeySchema.find((schema) => { | ||
return schema.KeyType === 'RANGE' | ||
}) | ||
if (rangeKey) { | ||
rangeKey.AttributeType = description.Table.AttributeDefinitions.find((definition) => { | ||
return definition.AttributeName === rangeKey.AttributeName | ||
}).AttributeType | ||
} | ||
res.render('get', Object.assign({}, | ||
description, { | ||
hashKey, | ||
rangeKey | ||
} | ||
)) | ||
}) | ||
}) | ||
app.get('/tables/:TableName', (req, res, next) => { | ||
@@ -95,0 +130,0 @@ const TableName = req.params.TableName |
{ | ||
"name": "dynamodb-admin", | ||
"version": "1.9.2", | ||
"version": "1.10.0", | ||
"description": "GUI for DynamoDB. Useful for local development.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
208570
19
682