mirror of
https://github.com/Xevion/xevion.dev.git
synced 2025-12-08 12:09:12 -06:00
Use directus return types, fix project link nested type API response
This commit is contained in:
@@ -25,13 +25,18 @@ async function getURLs(
|
||||
const urls = ["/technology"];
|
||||
|
||||
// Get all projects with the technology
|
||||
const all_projects = await directus.request(readItems("project"));
|
||||
if (all_projects != null) {
|
||||
for (const project of all_projects) {
|
||||
if (project.technologies?.some((t) => t.id === key))
|
||||
urls.push(`/projects/${project.id}`);
|
||||
}
|
||||
}
|
||||
const all_projects = await directus.request(readItems("project", {
|
||||
fields: ["id", {
|
||||
technologies: ["id"],
|
||||
}],
|
||||
}));
|
||||
|
||||
// if (all_projects != null) {
|
||||
// for (const project of all_projects) {
|
||||
// if (project.technologies?.some((t) => t.id === key))
|
||||
// urls.push(`/projects/${project.id}`);
|
||||
// }
|
||||
// }
|
||||
|
||||
return urls;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user