Skip to content

Commit e070413

Browse files
committed
style: format code
1 parent 9214b0e commit e070413

File tree

3 files changed

+41
-44
lines changed

3 files changed

+41
-44
lines changed

frontend/src/api/me.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import type { MyResponsibilities, MyResponsibilitiesFilters } from "@/dto/me";
22
import { instance } from ".";
3-
import type {MemberWithContact} from "@/dto/members.ts";
3+
import type { MemberWithContact } from "@/dto/members.ts";
44

55
export const getMe = () => instance.get<MemberWithContact>("/me");
66

77
export const getMyResponsibilities = (filters: MyResponsibilitiesFilters) =>
88
instance.get<MyResponsibilities>("/me/responsibilities", { params: filters });
99

1010
export const uploadMyImage = (file: File) => {
11-
const formData = new FormData();
12-
formData.append("image", file);
11+
const formData = new FormData();
12+
formData.append("image", file);
1313

14-
return instance.post("/me/image", formData);
15-
};
14+
return instance.post("/me/image", formData);
15+
};

frontend/src/api/members.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
import { instance } from ".";
2-
import type {
3-
AllMembersFilter,
4-
Member,
5-
} from "@/dto/members";
2+
import type { AllMembersFilter, Member } from "@/dto/members";
63

74
export const getAllMembers = (filters?: AllMembersFilter) =>
85
instance.get<Member[]>("/members", {
96
params: filters,
10-
});
7+
});

frontend/src/mutations/me.ts

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
1-
import {defineMutation, useMutation, useQueryCache} from "@pinia/colada";
2-
import {uploadMyImage} from "@/api/me.ts";
3-
import type {CreateContactData} from "@/dto/contacts.ts";
4-
import {updateContact} from "@/api/contacts.ts";
5-
import {ref} from "vue";
1+
import { defineMutation, useMutation, useQueryCache } from "@pinia/colada";
2+
import { uploadMyImage } from "@/api/me.ts";
3+
import type { CreateContactData } from "@/dto/contacts.ts";
4+
import { updateContact } from "@/api/contacts.ts";
5+
import { ref } from "vue";
66

77
export const useUploadImageMutation = defineMutation(() => {
8-
const file = ref<File>();
9-
const queryCache = useQueryCache();
8+
const file = ref<File>();
9+
const queryCache = useQueryCache();
1010

11-
const {mutate, ...mutation} = useMutation({
12-
mutation: () => uploadMyImage(file.value!),
13-
onSettled: () => {
14-
queryCache.invalidateQueries({key: ["me"]});
15-
},
16-
});
11+
const { mutate, ...mutation } = useMutation({
12+
mutation: () => uploadMyImage(file.value!),
13+
onSettled: () => {
14+
queryCache.invalidateQueries({ key: ["me"] });
15+
},
16+
});
1717

18-
return {
19-
mutate,
20-
...mutation,
21-
file,
22-
};
18+
return {
19+
mutate,
20+
...mutation,
21+
file,
22+
};
2323
});
2424

2525
export const useUpdateContactMutation = defineMutation(() => {
26-
const contactId = ref<string>();
27-
const data = ref<CreateContactData>();
28-
const queryCache = useQueryCache();
26+
const contactId = ref<string>();
27+
const data = ref<CreateContactData>();
28+
const queryCache = useQueryCache();
2929

30-
const {mutate, ...mutation} = useMutation({
31-
mutation: () => updateContact(contactId.value!, data.value!),
32-
onSettled: () => {
33-
queryCache.invalidateQueries({key: ["me"]});
34-
},
35-
});
30+
const { mutate, ...mutation } = useMutation({
31+
mutation: () => updateContact(contactId.value!, data.value!),
32+
onSettled: () => {
33+
queryCache.invalidateQueries({ key: ["me"] });
34+
},
35+
});
3636

37-
return {
38-
mutate,
39-
...mutation,
40-
contactId,
41-
data,
42-
};
43-
});
37+
return {
38+
mutate,
39+
...mutation,
40+
contactId,
41+
data,
42+
};
43+
});

0 commit comments

Comments
 (0)