feat: add stars field to comments
This commit is contained in:
@@ -141,6 +141,7 @@ export const diaryCommands: CommandDefinition[] = [
|
||||
{
|
||||
name: 'daylog',
|
||||
flags: [
|
||||
{ name: 'stars', type: 'number', required: true },
|
||||
{ name: 'text', type: 'string', required: true },
|
||||
{ name: 'date', type: 'date', required: false }
|
||||
]
|
||||
|
||||
@@ -3,6 +3,7 @@ import prisma from '@prisma/prisma';
|
||||
import { ShortcutsResponse } from '@utils/types';
|
||||
|
||||
export async function processDayLog(
|
||||
stars: number,
|
||||
text: string,
|
||||
date?: Date
|
||||
): Promise<ShortcutsResponse> {
|
||||
@@ -11,6 +12,7 @@ export async function processDayLog(
|
||||
normalizedDate.setUTCHours(0, 0, 0, 0);
|
||||
|
||||
const newComment: Prisma.JsonObject = {
|
||||
stars,
|
||||
text,
|
||||
timestamp: new Date().toISOString()
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user