fix: refine link creation response structure
Returns link object separately from shortLink in response to maintain clearer API structure and prevent unnecessary data duplication in the response payload
This commit is contained in:
parent
172956b532
commit
337f8f174c
1 changed files with 1 additions and 1 deletions
|
|
@ -24,6 +24,6 @@ export default eventHandler(async (event) => {
|
|||
})
|
||||
setResponseStatus(event, 201)
|
||||
const shortLink = `${getRequestProtocol(event)}://${getRequestHost(event)}/${link.slug}`
|
||||
return { ...link, shortLink }
|
||||
return { link, shortLink }
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue