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
2018-05-23 22:09:14 -07:00

18 lines
426 B
JavaScript

// @flow
import { Share } from '../models';
import { presentUser } from '.';
function present(ctx: Object, share: Share) {
return {
id: share.id,
documentTitle: share.document.title,
documentUrl: share.document.getUrl(),
url: `${process.env.URL}/share/${share.id}`,
createdBy: presentUser(ctx, share.user),
createdAt: share.createdAt,
updatedAt: share.updatedAt,
};
}
export default present;