Skip to content

Commit

Permalink
fix(backend): fix bug where satellite info not fetched (#261)
Browse files Browse the repository at this point in the history
* fix(backend): add slug to satellites in strapi, fix code so data is correctly fetched from strapi using slug

* lint and prettier

* compile types
  • Loading branch information
Lukas Thrane authored and GitHub committed Apr 13, 2024
1 parent 3f5bd78 commit bde79d2
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 196 deletions.
5 changes: 5 additions & 0 deletions backend/src/api/satellite/content-types/satellite/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@
},
"missionStatus": {
"type": "string"
},
"slug": {
"type": "uid",
"targetField": "name",
"required": true
}
}
}
9 changes: 9 additions & 0 deletions backend/types/generated/contentTypes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,12 @@ export interface PluginContentReleasesRelease extends Schema.CollectionType {
attributes: {
name: Attribute.String & Attribute.Required;
releasedAt: Attribute.DateTime;
scheduledAt: Attribute.DateTime;
timezone: Attribute.String;
status: Attribute.Enumeration<
['ready', 'blocked', 'failed', 'done', 'empty']
> &
Attribute.Required;
actions: Attribute.Relation<
'plugin::content-releases.release',
'oneToMany',
Expand Down Expand Up @@ -566,6 +572,7 @@ export interface PluginContentReleasesReleaseAction
'manyToOne',
'plugin::content-releases.release'
>;
isEntryValid: Attribute.Boolean;
createdAt: Attribute.DateTime;
updatedAt: Attribute.DateTime;
createdBy: Attribute.Relation<
Expand Down Expand Up @@ -985,6 +992,8 @@ export interface ApiSatelliteSatellite extends Schema.CollectionType {
'api::most-recent-image.most-recent-image'
>;
missionStatus: Attribute.String;
slug: Attribute.UID<'api::satellite.satellite', 'name'> &
Attribute.Required;
createdAt: Attribute.DateTime;
updatedAt: Attribute.DateTime;
publishedAt: Attribute.DateTime;
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/__generated__/gql.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit bde79d2

Please sign in to comment.