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.
outline/server/presenters/share.js

16 lines
393 B
JavaScript
Raw Normal View History

2018-05-13 06:14:06 +00:00
// @flow
import { Share } from '../models';
import { presentUser } from '.';
export default function present(share: Share) {
2018-05-13 06:14:06 +00:00
return {
id: share.id,
documentTitle: share.document.title,
documentUrl: share.document.url,
2018-05-17 06:07:33 +00:00
url: `${process.env.URL}/share/${share.id}`,
createdBy: presentUser(share.user),
2018-05-13 06:14:06 +00:00
createdAt: share.createdAt,
updatedAt: share.updatedAt,
};
}