Function
deleteShortLink
(workspaceId: string, id: string)
Source from the content-addressed store, hash-verified
| 105 | * Delete short link (soft delete) |
| 106 | */ |
| 107 | export async function deleteShortLink(workspaceId: string, id: string) { |
| 108 | const shortLink = await prisma.shortLink.updateMany({ |
| 109 | where: { |
| 110 | id, |
| 111 | workspaceId, |
| 112 | }, |
| 113 | data: { |
| 114 | deletedAt: new Date(), |
| 115 | enabled: false, |
| 116 | }, |
| 117 | }); |
| 118 | |
| 119 | return shortLink; |
| 120 | } |
| 121 | |
| 122 | /** |
| 123 | * Get all short links for a workspace |
Tested by
no test coverage detected