适配typescript编译

This commit is contained in:
tangly1024.com
2024-09-23 18:46:53 +08:00
parent 65d1932837
commit d94344c14a
5 changed files with 36 additions and 18 deletions

View File

@@ -110,6 +110,10 @@ const fetchToken = async (code: string): Promise<NotionTokenResponse> => {
}
} catch (error) {
console.error('Error fetching token', error)
return null
return {
status: 400,
statusText: 'failed',
data: null as unknown as NotionTokenResponseData
}
}
}