Added getLinkObjectById to the link controller
This commit is contained in:
parent
a5498d3409
commit
eb5e070fac
@ -4,7 +4,13 @@ import {ShortenedLink} from "../models/ShortenedLink";
|
|||||||
* Gets a link object from an id
|
* Gets a link object from an id
|
||||||
* @param shortenedId The link id (shortened)
|
* @param shortenedId The link id (shortened)
|
||||||
*/
|
*/
|
||||||
export const getLinkById = (shortenedId: string) => ShortenedLink.findOne({shortenedId: shortenedId}, {_id: 0, __v: 0});
|
export const getLinkById = (shortenedId: string) => ShortenedLink.findOne({shortenedId}, {_id: 0, __v: 0});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the complete link object from an id
|
||||||
|
* @param shortenedId The link id (shortened)
|
||||||
|
*/
|
||||||
|
export const getLinkObjectById = (shortenedId: string) => ShortenedLink.findOne({shortenedId});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shorts a new link
|
* Shorts a new link
|
||||||
|
Loading…
x
Reference in New Issue
Block a user