This repository has been archived on 2022-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
2018-05-13 06:14:06 +00:00
|
|
|
// @flow
|
|
|
|
import { Share } from '../models';
|
|
|
|
import { presentUser } from '.';
|
|
|
|
|
2019-04-18 02:11:23 +00:00
|
|
|
export default function present(share: Share) {
|
2018-05-13 06:14:06 +00:00
|
|
|
return {
|
|
|
|
id: share.id,
|
|
|
|
documentTitle: share.document.title,
|
2018-11-04 07:59:52 +00:00
|
|
|
documentUrl: share.document.url,
|
2018-05-17 06:07:33 +00:00
|
|
|
url: `${process.env.URL}/share/${share.id}`,
|
2019-04-18 02:11:23 +00:00
|
|
|
createdBy: presentUser(share.user),
|
2018-05-13 06:14:06 +00:00
|
|
|
createdAt: share.createdAt,
|
|
|
|
updatedAt: share.updatedAt,
|
|
|
|
};
|
|
|
|
}
|