(userId: string)
| 11 | |
| 12 | useEffect(() => { |
| 13 | const refreshPaymentList = async (userId: string) => { |
| 14 | let list: Payment[] = []; |
| 15 | try { |
| 16 | const { data } = await axios.get("/api/payment", { |
| 17 | headers: { Authorization: `Bearer ${userId}` }, |
| 18 | }); |
| 19 | list = data; |
| 20 | } catch (error) { |
| 21 | // do nth |
| 22 | } |
| 23 | setList(list); |
| 24 | }; |
| 25 | |
| 26 | if (session?.user.id) { |
| 27 | refreshPaymentList(session.user.id); |
no outgoing calls
no test coverage detected