Add short link (#85)

Co-authored-by: Germey <germey@acedata.cloud>
This commit is contained in:
GermeyandGermey authored and GitHub committed 2024-07-16 13:56:26 +00:00
1 parent fbdb163844
commit 7421cc22c9
69 files changed
+3201 -675

No files matched your search

+18
View File
@@ -62,3 +62,21 @@ class DistributionLevelService {
}
export const distributionLevelOperator = new DistributionLevelService();
interface IShortUrlCreateResponse {
data: {
url: string;
};
}
class ShortUrlService {
key = 'shorturl';
async create(url: string): Promise<AxiosResponse<IShortUrlCreateResponse>> {
return await httpClient.post(`/${this.key}`, {
content: url
});
}
}
export const shortUrlOperator = new ShortUrlService();