hardcode url to doorman
This commit is contained in:
parent
1c0f633553
commit
a227f82adb
@ -27,9 +27,6 @@ exports.handler = async function(context, event, callback) {
|
|||||||
|
|
||||||
await client.send(ddb.replaceDoorConfigWithUpdateItem(newConfig));
|
await client.send(ddb.replaceDoorConfigWithUpdateItem(newConfig));
|
||||||
|
|
||||||
const hostUrl = event.request.headers.host;
|
|
||||||
const scheme = hostUrl.startsWith("localhost") ? "http://": "https://";
|
|
||||||
|
|
||||||
// send update to discord users
|
// send update to discord users
|
||||||
const updateMessage = `Configuration change \`${approvalId}\` was approved @ Door "${door}"`;
|
const updateMessage = `Configuration change \`${approvalId}\` was approved @ Door "${door}"`;
|
||||||
|
|
||||||
@ -74,10 +71,7 @@ exports.handler = async function(context, event, callback) {
|
|||||||
newConfig.fallbackNumber = undefined;
|
newConfig.fallbackNumber = undefined;
|
||||||
newConfig.status = undefined;
|
newConfig.status = undefined;
|
||||||
|
|
||||||
const hostUrl = event.request.headers.host;
|
const approvalUrl = `https://doorman.chromart.cc/api/door/edit?door=${door}&approvalId=${input.input.Item.approvalId.S}`;
|
||||||
const scheme = hostUrl.startsWith("localhost") ? "http://": "https://";
|
|
||||||
|
|
||||||
const approvalUrl = `${scheme + hostUrl}/api/door/edit?door=${door}&approvalId=${input.input.Item.approvalId.S}`;
|
|
||||||
console.log(approvalUrl);
|
console.log(approvalUrl);
|
||||||
|
|
||||||
// send update to discord users
|
// send update to discord users
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import React, { ReactElement } from "react";
|
import { ReactElement } from "react";
|
||||||
import { ReactNode } from "react";
|
import { useSearchParams } from "react-router-dom";
|
||||||
import { useLocation, useSearchParams } from "react-router-dom";
|
|
||||||
|
|
||||||
export interface IQueryRouterProps {
|
export interface IQueryRouterProps {
|
||||||
mapping: Record<string, ReactElement>;
|
mapping: Record<string, ReactElement>;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user