This commit is contained in:
James Purser 2025-10-12 13:34:24 +11:00
parent 75c0483bf5
commit 66e145b580
4 changed files with 3998 additions and 37 deletions

15
data/external/cms.js vendored
View file

@ -241,21 +241,21 @@ export const getLatestPodcastEpisode = async () => {
return res
}
// Tests
export const getAllGalleries = async(page, limit) => {
const { serverRuntimeConfig, publicRuntimeConfig } = getConfig()
const qs = require('qs')
var query = qs.stringify({
sort: ['publishedAt:desc'],
sort: 'publishedAt:desc',
pagination: {
page: page,
pageSize: limit
},
populate: {
gallery_images: {
populate: '*'
}
}
populate: 'gallery_images'
}, {
encodeValuesOnly: true
})
const galres = await fetch(process.env.API + `galleries?${query}`, {
@ -456,6 +456,9 @@ export const getLatestContent = async () => {
const latestNews = await fetch(serverRuntimeConfig.base_path + `articles?${newsQuery}`, {
headers: new Headers({
'Authorization': serverRuntimeConfig.strapi_token,
'Headers': {
"Strapi-Response-Format": "v4"
},
'Content-Type': 'application/x-www-form-urlencoded'
})
})

3997
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -4,9 +4,9 @@
"description": "The frontend for the angrybeanie website",
"main": "index.js",
"scripts": {
"dev": "NODE_OPTIONS='--inspect' next",
"dev": "NODE_OPTIONS='--inspect' next -p 3001",
"build": "next build",
"start": "next start"
"start": "next start -p 3001"
},
"author": "James Purser",
"license": "ISC",

View file

@ -222,19 +222,13 @@
"@types/react" "*"
"@types/react@*", "@types/react@>=16.14.8", "@types/react@>=16.9.11":
version "17.0.19"
resolved "https://registry.npmjs.org/@types/react/-/react-17.0.19.tgz"
integrity sha512-sX1HisdB1/ZESixMTGnMxH9TDe8Sk709734fEQZzCV/4lSu9kJCPbo2PbTRoZM+53Pp0P10hYVyReUueGwUi4A==
version "18.3.4"
resolved "https://registry.npmjs.org/@types/react/-/react-18.3.4.tgz"
integrity sha512-J7W30FTdfCxDDjmfRM+/JqLHBIyl7xUIp9kwK637FGmY7+mkSFSe6L4jpZzhj5QMfLssSDP4/i75AKkrdC7/Jw==
dependencies:
"@types/prop-types" "*"
"@types/scheduler" "*"
csstype "^3.0.2"
"@types/scheduler@*":
version "0.16.2"
resolved "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz"
integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==
"@types/warning@^3.0.0":
version "3.0.0"
resolved "https://registry.npmjs.org/@types/warning/-/warning-3.0.0.tgz"
@ -2324,10 +2318,9 @@ pkg-dir@^2.0.0:
dependencies:
find-up "^2.1.0"
podcast@^2.0.1:
version "2.0.1"
resolved "https://registry.npmjs.org/podcast/-/podcast-2.0.1.tgz"
integrity sha512-TWXe/zVziwJNksAn7RLkSre+Z6VQgbs/+gC7qQCKdkyw0hv2hdFGOY9rHgKqa4LI+UP+yZBa6Wr+b9a9vrYDYQ==
"podcast@github:purserj/node-podcast":
version "2.0.2-a"
resolved "git+ssh://git@github.com/purserj/node-podcast.git#7a230c6cce5aa5a288fe87f44227ac66012cfad3"
dependencies:
rss "^1.2.2"