mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 01:51:40 -05:00
Get app to run
This commit is contained in:
parent
62dffa6a9d
commit
66b8570422
5 changed files with 18 additions and 9 deletions
|
@ -37,7 +37,7 @@ class PostsItem extends PureComponent {
|
|||
<div className={postClass}>
|
||||
|
||||
<div className="posts-item-vote">
|
||||
<Components.Vote collection={Posts} document={post} currentUser={this.props.currentUser}/>
|
||||
{/* TODO <Components.Vote collection={Posts} document={post} currentUser={this.props.currentUser}/>*/}
|
||||
</div>
|
||||
|
||||
{post.thumbnailUrl ? <Components.PostsThumbnail post={post}/> : null}
|
||||
|
|
|
@ -20,7 +20,7 @@ registerFragment(`
|
|||
...UsersMinimumInfo
|
||||
}
|
||||
# vulcan:embedly
|
||||
thumbnailUrl
|
||||
# thumbnailUrl
|
||||
# vulcan:categories
|
||||
categories {
|
||||
...CategoriesMinimumInfo
|
||||
|
|
|
@ -4,6 +4,15 @@ GraphQL config
|
|||
|
||||
*/
|
||||
|
||||
import { addGraphQLMutation } from 'meteor/vulcan:core';
|
||||
import { addGraphQLMutation, addGraphQLResolvers } from 'meteor/vulcan:core';
|
||||
|
||||
const specificResolvers = {
|
||||
Mutation: {
|
||||
increasePostViewCount(root, { postId }, context) {
|
||||
return context.Posts.update({_id: postId}, { $inc: { viewCount: 1 }});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
addGraphQLResolvers(specificResolvers);
|
||||
addGraphQLMutation('increasePostViewCount(postId: String): Float');
|
||||
|
|
|
@ -36,7 +36,7 @@ var createPost = function (slug, postedAt, username, thumbnail) {
|
|||
|
||||
var post = {
|
||||
postedAt: postedAt,
|
||||
body: Assets.getText("content/" + slug + ".md"),
|
||||
body: Assets.getText("lib/assets/content/" + slug + ".md"),
|
||||
title: toTitleCase(slug.replace(/_/g, ' ')),
|
||||
dummySlug: slug,
|
||||
isDummy: true,
|
||||
|
@ -44,7 +44,7 @@ var createPost = function (slug, postedAt, username, thumbnail) {
|
|||
};
|
||||
|
||||
if (typeof thumbnail !== "undefined")
|
||||
post.thumbnailUrl = "/packages/vulcan_getting-started/content/images/" + thumbnail;
|
||||
post.thumbnailUrl = "/packages/example-forum/lib/assets/images/" + thumbnail;
|
||||
|
||||
newMutation({
|
||||
collection: Posts,
|
||||
|
|
|
@ -46,10 +46,10 @@ Package.onUse(function (api) {
|
|||
|
||||
api.addAssets([
|
||||
'lib/assets/content/read_this_first.md',
|
||||
'lib/assets/content/deploying.md', 'server',
|
||||
'lib/assets/content/customizing.md', 'server',
|
||||
'lib/assets/content/getting_help.md', 'server', 'server',
|
||||
'lib/assets/content/removing_getting_started_posts.md', 'server',
|
||||
'lib/assets/content/deploying.md',
|
||||
'lib/assets/content/customizing.md',
|
||||
'lib/assets/content/getting_help.md',
|
||||
'lib/assets/content/removing_getting_started_posts.md',
|
||||
], ['server']);
|
||||
|
||||
api.addFiles([
|
||||
|
|
Loading…
Add table
Reference in a new issue