絵文字を作成した/更新した時にupdateAtを更新するように

This commit is contained in:
syuilo 2018-11-04 10:42:16 +09:00
parent 589607e4a8
commit 4a780c56fd
2 changed files with 2 additions and 0 deletions

View file

@ -28,6 +28,7 @@ export const meta = {
export default define(meta, (ps) => new Promise(async (res, rej) => { export default define(meta, (ps) => new Promise(async (res, rej) => {
await Emoji.insert({ await Emoji.insert({
updatedAt: new Date(),
name: ps.name, name: ps.name,
host: null, host: null,
aliases: ps.aliases, aliases: ps.aliases,

View file

@ -39,6 +39,7 @@ export default define(meta, (ps) => new Promise(async (res, rej) => {
await Emoji.update({ _id: emoji._id }, { await Emoji.update({ _id: emoji._id }, {
$set: { $set: {
updatedAt: new Date(),
name: ps.name, name: ps.name,
aliases: ps.aliases, aliases: ps.aliases,
url: ps.url url: ps.url