mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: add WebPreviews blocks
This commit is contained in:
parent
b1c4ddd0b7
commit
8d3ede1486
11 changed files with 482 additions and 0 deletions
|
|
@ -160,3 +160,12 @@ export async function updateActivity(
|
|||
const res = await getResponseMetadata(result)
|
||||
return res
|
||||
}
|
||||
|
||||
export async function getUrlPreview(url: string) {
|
||||
const result = await fetch(
|
||||
`${getAPIUrl()}utils/link-preview?url=${url}`,
|
||||
RequestBodyWithAuthHeader('GET', null, null, undefined)
|
||||
)
|
||||
const res = await result.json()
|
||||
return res
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue