Skip to content

Commit

Permalink
handle WordPress internal attributes conversion to lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
c2d13p committed Aug 1, 2024
1 parent c523b46 commit ebcd058
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions server/controllers/public/conferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ async function conferencesQuery(req) {
match["grants"] = ObjectId(req.query.grants)
}

if (req.query.SSD) {
match["SSD"] = req.query.SSD
if (req.query.ssd) {
match["SSD"] = req.query.ssd
}

if (req.query.isOutreach !== undefined) {
match["isOutreach"] = req.query.isOutreach === 'true'
if (req.query.is_outreach !== undefined) {
match["isOutreach"] = req.query.is_outreach === 'true'
}

const sort_and_limit = createSortAndLimitFilters(req)
Expand Down
4 changes: 2 additions & 2 deletions widgets/src/components/ConferenceList.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import rehypeKatex from 'rehype-katex'
import remarkMath from 'remark-math'
import { useQuery } from 'react-query'

export function ConferenceList({ from, to, grants, SSD, isOutreach, _sort, _limit }) {
const filter = { from, to, grants, SSD, isOutreach, _sort, _limit }
export function ConferenceList({ from, to, grants, ssd, is_outreach, _sort, _limit }) {
const filter = { from, to, grants, ssd, is_outreach, _sort, _limit }

const { isLoading, error, data } = useQuery([ 'conferences', filter ], async () => {
const res = await axios.get(getManageURL("public/conferences"), { params: filter })
Expand Down
3 changes: 2 additions & 1 deletion widgets/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@
})
dmwidgets.loadComponent(document.getElementById("conferencelist"), "ConferenceList", {
from: '2021-01-01',
_limit: 50
_limit: 50,
is_outreach: true
// category: '653b5d8d10c0279ad486c807'
})
dmwidgets.loadComponent(document.getElementById('homeeventlist'), "HomeEventList", {
Expand Down
2 changes: 1 addition & 1 deletion widgets/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export function getSSDLink(SSD) {
}

if (label != "") {
return <a key={"SSD-link-" + SSD} href={"https://www.dm.unipi.it/en/conferences?SSD=" + SSD.replace("/", "%2F")}>{SSD}</a>
return <a key={"SSD-link-" + SSD} href={"https://www.dm.unipi.it/en/conferences?ssd=" + SSD.replace("/", "%2F")}>{SSD}</a>
}

return ""
Expand Down

0 comments on commit ebcd058

Please sign in to comment.