mirror of
https://github.com/He4eT/simple-spaceapi.git
synced 2026-05-05 01:47:24 +00:00
SpaceAPI: feeds
This commit is contained in:
parent
6a7a9d8d1b
commit
c8112d608f
1 changed files with 27 additions and 0 deletions
|
|
@ -38,6 +38,10 @@ export default ({ strapi }: { strapi: Core.Strapi }) => ({
|
||||||
'contact',
|
'contact',
|
||||||
'contact.keymasters',
|
'contact.keymasters',
|
||||||
'feeds',
|
'feeds',
|
||||||
|
'feeds.blog',
|
||||||
|
'feeds.wiki',
|
||||||
|
'feeds.calendar',
|
||||||
|
'feeds.flickr',
|
||||||
'projects',
|
'projects',
|
||||||
'links',
|
'links',
|
||||||
'membership_plans',
|
'membership_plans',
|
||||||
|
|
@ -170,6 +174,29 @@ export default ({ strapi }: { strapi: Core.Strapi }) => ({
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
|
/* Sensors */
|
||||||
|
|
||||||
|
/* */
|
||||||
|
|
||||||
|
if (!isEmpty(hackspace.feeds)) {
|
||||||
|
const feeds = pickFields([
|
||||||
|
'blog',
|
||||||
|
'wiki',
|
||||||
|
'calendar',
|
||||||
|
'flickr',
|
||||||
|
])(hackspace.feeds);
|
||||||
|
|
||||||
|
result.feeds = Object.fromEntries(
|
||||||
|
Object.entries(feeds)
|
||||||
|
.map(([k, v]) => [k, pickFields([
|
||||||
|
'type',
|
||||||
|
'url',
|
||||||
|
])(v)])
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* */
|
||||||
|
|
||||||
return ctx.send(result);
|
return ctx.send(result);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue