Skip to content

Commit

Permalink
73 add feature to show the most recent image (#148)
Browse files Browse the repository at this point in the history
* feat(backend): ✨ create a most recent image collection type in strapi

* feat(frontend): ✨ make most recent image query

* feat(frontend): ✨ display most recent satellite image on homepage
  • Loading branch information
Mats authored and GitHub committed Mar 18, 2024
1 parent 28332c5 commit 4dd1f88
Show file tree
Hide file tree
Showing 9 changed files with 741 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"kind": "collectionType",
"collectionName": "most_recent_images",
"info": {
"singularName": "most-recent-image",
"pluralName": "most-recent-images",
"displayName": "Most Recent Image"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"mostRecentImage": {
"allowedTypes": [
"images",
"files",
"videos",
"audios"
],
"type": "media",
"multiple": false,
"required": true
},
"satellite": {
"type": "relation",
"relation": "oneToOne",
"target": "api::satellite.satellite"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'use strict';

/**
* most-recent-image controller
*/

const { createCoreController } = require('@strapi/strapi').factories;

module.exports = createCoreController('api::most-recent-image.most-recent-image');
Loading

0 comments on commit 4dd1f88

Please sign in to comment.