First pass at API
This commit is contained in:
15
server/presenters/share.js
Normal file
15
server/presenters/share.js
Normal file
@@ -0,0 +1,15 @@
|
||||
// @flow
|
||||
import { Share } from '../models';
|
||||
import { presentUser } from '.';
|
||||
|
||||
function present(ctx: Object, share: Share) {
|
||||
return {
|
||||
id: share.id,
|
||||
user: presentUser(ctx, share.user),
|
||||
documentTitle: share.document.title,
|
||||
createdAt: share.createdAt,
|
||||
updatedAt: share.updatedAt,
|
||||
};
|
||||
}
|
||||
|
||||
export default present;
|
||||
Reference in New Issue
Block a user