mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
feat: migreate get user profile to trpc
This commit is contained in:
1 parent
ac92950177
commit
423548804a
11 files changed
+54
-62
No files matched your search
@@ -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() {
|
||||
|
||||
Reference in new issue
Block a user