use greeting from DDB and fix config query
This commit is contained in:
parent
a227f82adb
commit
dccd56bfa5
@ -70,6 +70,7 @@ exports.handler = async function(context, event, callback) {
|
||||
fallbackNumbers: config.Item.fallbackNumbers.SS,
|
||||
pressKey: config.Item.pressKey.S,
|
||||
discordUsers: config.Item?.discordUsers?.SS || [],
|
||||
greeting: config.Item?.greeting.S || "",
|
||||
});
|
||||
|
||||
}).catch((e) => {
|
||||
|
||||
@ -142,7 +142,7 @@ exports.getDoorConfigCommand = (door) => {
|
||||
S: `door-${door}`,
|
||||
},
|
||||
"SK": {
|
||||
S: "config-update",
|
||||
S: "config",
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@ -254,7 +254,7 @@ export function DoorPage() {
|
||||
>
|
||||
<SpaceBetween size='l' alignItems="center">
|
||||
<TextContent>
|
||||
That's it! Enter the building and hit floor 11 on the elevator. We are unit 1105, just to the left off the elevator
|
||||
{doorResponse.greeting || "The door is unlocked!"}
|
||||
</TextContent>
|
||||
<img src="/Insulin_Nation_Low_Kramer.gif"/>
|
||||
</SpaceBetween>
|
||||
|
||||
@ -4,7 +4,7 @@ import { DoorResponse } from "../types/DoorResponse";
|
||||
import { useForm } from "react-hook-form";
|
||||
import { InputTokenGroup } from "../components/InputTokenGroup";
|
||||
|
||||
export type DoorEditForm = DoorResponse & { pin: string, fallbackNumber: string, discordUser: string, greeting: string };
|
||||
export type DoorEditForm = DoorResponse & { pin: string, fallbackNumber: string, discordUser: string };
|
||||
|
||||
export const EditPage = () => {
|
||||
const doorResponse = useLoaderData() as DoorResponse;
|
||||
|
||||
@ -6,4 +6,5 @@ export interface DoorResponse {
|
||||
pressKey: string;
|
||||
discordUsers: string[];
|
||||
buzzer: string;
|
||||
greeting: string;
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user