Skip to content

Commit

Permalink
fix: response.json()
Browse files Browse the repository at this point in the history
  • Loading branch information
enpitsuLin committed Aug 11, 2024
1 parent a17ea94 commit 7a9b777
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/api/skland.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,9 @@ export async function attendance(cred: string, token: string, body: { uid: strin
const [sign, cryptoHeaders] = generateSignature(token, SKLAND_ATTENDANCE_URL, body)
const headers = Object.assign(cryptoHeaders, { sign, cred, 'Content-Type': 'application/json;charset=utf-8' }, command_header)

const response = await ofetch(
const data = await ofetch<AttendanceResponse>(
SKLAND_ATTENDANCE_URL,
{ method: 'POST', headers, body: JSON.stringify(body) },
)
const data = await response.json() as AttendanceResponse

return data
}

0 comments on commit 7a9b777

Please sign in to comment.