Use new api function and now tickets animate whenever input is changed.

This commit is contained in:
2020-03-10 00:23:09 +01:00
parent d04164280f
commit 6c05a829ac
2 changed files with 16 additions and 28 deletions

View File

@@ -13,6 +13,7 @@
import { page, event } from "vue-analytics";
import Banner from "@/ui/Banner";
import Wine from "@/ui/Wine";
import { overallWineStatistics } from "@/api";
export default {
components: {
@@ -25,8 +26,8 @@ export default {
};
},
async mounted() {
const _wines = await fetch("/api/wines/statistics/overall");
this.wines = (await _wines.json()).sort((a, b) =>
const wines = await overallWineStatistics();
this.wines = wines.sort((a, b) =>
a.rating > b.rating ? -1 : 1
);
}