feat: migreate get user profile to trpc

This commit is contained in:
Justin Lin committed 2025-04-16 16:40:03 +08:00
1 parent ac92950177
commit 423548804a
11 files changed
+54 -62

No files matched your search

+2 -2
View File
@@ -1,5 +1,5 @@
import { defineStore } from 'pinia'
import { getUserProfile } from '../utils/api'
import { trpc } from '../utils/trpc'
interface IProgress {
quest: string
@@ -23,7 +23,7 @@ const useUserProfile = defineStore('userProfile', {
}),
actions: {
async loadUserProfile() {
const res = await getUserProfile()
const res = await trpc.users.getMyProfile.query()
this.$patch(res)
},
async resetUserProfile() {