return SHortnames in events

This commit is contained in:
Luke Berndt
2023-02-03 20:23:55 -05:00
parent 86d8c0b710
commit 51f739395d
2 changed files with 36 additions and 36 deletions

View File

@@ -23,7 +23,7 @@ exports.getEvent = async function (req, res, next) {
exports.getEvents = async function (req, res, next) { exports.getEvents = async function (req, res, next) {
try { try {
let events = await Event.find({},["title", "description", "startTime", "endTime", "expireTime", "numCalls", "createdAt"]).exec(); let events = await Event.find({},["title", "description", "startTime", "endTime", "expireTime", "numCalls", "createdAt", "shortNames"]).exec();
res.contentType('json'); res.contentType('json');
res.send(JSON.stringify(events)); res.send(JSON.stringify(events));
} }

View File

@@ -36,7 +36,7 @@ const ListEvents = (props) => {
const { data: events, isSuccess } = useGetEventsQuery(); const { data: events, isSuccess } = useGetEventsQuery();
const navigate = useNavigate(); const navigate = useNavigate();
//<Table.Cell>{event.shortNames.map( shortName => <Link to={"/system/"+shortName}>{shortName}</Link> )}</Table.Cell>}
return ( return (
<div> <div>
<NavBar /> <NavBar />