Skip to content

Commit

Permalink
Update server.js
Browse files Browse the repository at this point in the history
  • Loading branch information
gboege committed Apr 21, 2024
1 parent b8decae commit ae8ca3e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
5 changes: 3 additions & 2 deletions public/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,9 @@ body {

.header h2 {
color: #000000;
float: center;
text-align: center;
vertical-align: middle;
text-decoration:none;
text-decoration: none;
}

.title {
Expand Down Expand Up @@ -168,7 +167,9 @@ body {
}

.content-delivery-row {
float: center;
margin-top: 50px;
padding-left: 20px;
text-align: center;
margin-left: auto;
margin-right: auto;
Expand Down
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ app.post('/portal', async (req, res) => {
var entity_attributes = [];

if (result.delivery) {
entity = result.delivery;
entity = result.delivery.output;
entity_keys = Object.keys(entity);
for (var key in entity_keys) {
let attribute = {
Expand Down
5 changes: 2 additions & 3 deletions views/default.pug
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ html
a.header(href='/')
img.header(src='https://thebatterypass.io/_next/static/media/logo_primary.ff8fcc3a.png' alt='Homepage')
div
a.header(href='/')
h2.header
|Demo: Login with Verifiable Credentials (VCs)
h2.header
|Demo: Login with Verifiable Credentials (VCs)
block topnav
block content
9 changes: 4 additions & 5 deletions views/portal.pug
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ extends portal-layout
block user
a(href=`/logout`)
| Logout
p #{user}


block search
Expand All @@ -12,13 +11,13 @@ block search
p.portal-delivery
|
label(for='entity_type') Type:
input(type='text', name='entity_type', id='entity_type', value=entity_type, size="50")
input(type='text', name='entity_type', id='entity_type', value="Battery", size="50")
input(type='submit', value="Get entities")
form(action='/portal', method='POST')
p.portal-delivery
|
label(for='entity_id') #{input_label}:
input(type='text', name='entity_id', id='entity_id', value=entity_id, size="50")
label(for='entity_id') Battery Passport ID:
input(type='text', name='entity_id', id='entity_id', value="urn:batterypass:4a1331e8-646b-423d-b75a-cee15c486555", size="50")
input(type='submit', value=get_label)
hr
block entities
Expand Down Expand Up @@ -122,7 +121,7 @@ block delivery
th Attribute
th Values
tbody
each i in entity_attributes.output
each i in entity_attributes
tr
if i[0] != 'id' && i[0] != 'type'
td #{i[0]}
Expand Down

0 comments on commit ae8ca3e

Please sign in to comment.