mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-10-28 00:34:47 -04:00
Consolidate frontend types (#1245)
This commit is contained in:
committed by
GitHub
parent
6a88a59981
commit
479900e912
@@ -1,7 +1,7 @@
|
||||
import { useAsync, ref } from "@nuxtjs/composition-api";
|
||||
import { useAsyncKey } from "./use-utils";
|
||||
import { useUserApi } from "~/composables/api";
|
||||
import { CreateGroup } from "~/api/class-interfaces/groups";
|
||||
import { GroupBase } from "~/types/api-types/user";
|
||||
|
||||
export const useGroupSelf = function () {
|
||||
const api = useUserApi();
|
||||
@@ -17,7 +17,7 @@ export const useGroupSelf = function () {
|
||||
return group;
|
||||
},
|
||||
async updatePreferences() {
|
||||
if (!group.value) {
|
||||
if (!group.value?.preferences) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ export const useGroups = function () {
|
||||
return data;
|
||||
}
|
||||
|
||||
async function createGroup(payload: CreateGroup) {
|
||||
async function createGroup(payload: GroupBase) {
|
||||
loading.value = true;
|
||||
const { data } = await api.groups.createOne(payload);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user