Skip to content

Commit

Permalink
Fix link relations (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
webb-ben authored Jan 10, 2023
1 parent 07ad922 commit 6c41317
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/components/data/DataNavigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default {
handler(c) {
if (hasLinks(this.station)) {
for (const item of c) {
if (this.station.links[0].title === item.id) {
if (this.station.properties.topic === item.id) {
this.updateCollection(item);
}
}
Expand Down
9 changes: 5 additions & 4 deletions src/components/station/StationHistory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<script>
import Plotly from "plotly.js-dist-min";
import { clean, hasLinks } from "@/scripts/helpers.js";
let oapi = window.VUE_APP_OAPI;
import { defineComponent } from "vue";
Expand Down Expand Up @@ -103,7 +104,7 @@ export default defineComponent({
this.data = [];
await this.$http({
method: "get",
url: station.links[0].href + "/items",
url: oapi + "/collections/" + station.properties.topic + "/items",
params: {
f: "json",
sortby: "+resultTime",
Expand Down Expand Up @@ -140,7 +141,7 @@ export default defineComponent({
var self = this;
await this.$http({
method: "get",
url: station.links[0].href + "/items",
url: oapi + "/collections/" + station.properties.topic + "/items",
params: {
f: "json",
index: index,
Expand Down Expand Up @@ -178,7 +179,7 @@ export default defineComponent({
var date_ = d.toISOString().split("T")[0];
await this.$http({
method: "get",
url: station.links[0].href + "/items",
url: oapi + "/collections/" + station.properties.topic + "/items",
params: {
f: "json",
datetime: date_,
Expand Down Expand Up @@ -246,7 +247,7 @@ export default defineComponent({
this.iterDate(nextDate);
this.$http({
method: "get",
url: station.links[0].href + "/items",
url: oapi + "/collections/" + station.properties.topic + "/items",
params: {
f: "json",
datetime: `${nextDate.toISOString()}/..`,
Expand Down
5 changes: 3 additions & 2 deletions src/components/station/StationLatest.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

<script>
import { defineComponent } from "vue";
let oapi = window.VUE_APP_OAPI;
import { getNameTime, clean, hasLinks } from "@/scripts/helpers.js";
Expand Down Expand Up @@ -60,7 +61,7 @@ export default defineComponent({
var self = this;
await this.$http({
method: "get",
url: station.links[0].href + "/items",
url: oapi + "/collections/" + station.properties.topic + "/items",
params: {
f: "json",
sortby: "-resultTime",
Expand Down Expand Up @@ -93,7 +94,7 @@ export default defineComponent({
var self = this;
await this.$http({
method: "get",
url: station.links[0].href + "/items",
url: oapi + "/collections/" + station.properties.topic + "/items",
params: {
f: "json",
datetime: `${self.latestResultTime}/..`,
Expand Down

0 comments on commit 6c41317

Please sign in to comment.