mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-26 02:24:43 +00:00
refactor: simplify redundant ternary in updateMessage (#13954)
This commit is contained in:
@@ -579,7 +579,7 @@ export namespace Session {
|
|||||||
})
|
})
|
||||||
|
|
||||||
export const updateMessage = fn(MessageV2.Info, async (msg) => {
|
export const updateMessage = fn(MessageV2.Info, async (msg) => {
|
||||||
const time_created = msg.role === "user" ? msg.time.created : msg.time.created
|
const time_created = msg.time.created
|
||||||
const { id, sessionID, ...data } = msg
|
const { id, sessionID, ...data } = msg
|
||||||
Database.use((db) => {
|
Database.use((db) => {
|
||||||
db.insert(MessageTable)
|
db.insert(MessageTable)
|
||||||
|
|||||||
Reference in New Issue
Block a user