This commit is contained in:
parent
95ed21ff8c
commit
5c659f2f38
|
|
@ -9,13 +9,6 @@ export const getProfileByUserId = async (userId: string) => {
|
||||||
.eq("user_id", userId)
|
.eq("user_id", userId)
|
||||||
.single()
|
.single()
|
||||||
|
|
||||||
|
|
||||||
if (error) {
|
|
||||||
console.error(`Error fetching profile: ${error.message}`) // 错误日志
|
|
||||||
throw new Error(error.message)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (!profile) {
|
if (!profile) {
|
||||||
throw new Error(error.message)
|
throw new Error(error.message)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue