mirror of
https://github.com/wassname/talk.git
synced 2026-07-26 13:37:38 +08:00
Implement Timestamp
Merge branch 'next' into timestamp Fix test and translations Merge branch 'timestamp' of github.com:coralproject/talk into timestamp * 'timestamp' of github.com:coralproject/talk: Fix test and translations Implement Timestamp
This commit is contained in:
@@ -43,7 +43,7 @@ async function createTenantRouter(opts: AppOptions) {
|
||||
async function createAPIRouter(opts: AppOptions) {
|
||||
// Create a router.
|
||||
const router = express.Router();
|
||||
|
||||
|
||||
// Configure the tenant routes.
|
||||
router.use("/tenant", await createTenantRouter(opts));
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@ import Context from "talk-server/graph/tenant/context";
|
||||
import { Comment, ConnectionInput } from "talk-server/models/comment";
|
||||
|
||||
export default {
|
||||
createdAt: async (comment: Comment, _: any, ctx: Context) =>
|
||||
comment.created_at,
|
||||
author: async (comment: Comment, _: any, ctx: Context) =>
|
||||
ctx.loaders.Users.user.load(comment.author_id),
|
||||
replies: async (comment: Comment, input: ConnectionInput, ctx: Context) =>
|
||||
|
||||
@@ -202,6 +202,11 @@ type Comment {
|
||||
"""
|
||||
body: String
|
||||
|
||||
"""
|
||||
createdAt is the date in which the comment was created.
|
||||
"""
|
||||
createdAt: Time
|
||||
|
||||
"""
|
||||
author is the User that authored the Comment.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user