mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-25 03:17:38 -07:00
oops
This commit is contained in:
parent
5957946f6a
commit
12db5cde5f
2 changed files with 3 additions and 3 deletions
|
@ -39,6 +39,6 @@ module.exports = (params, user) => new Promise(async (res, rej) => {
|
||||||
|
|
||||||
// Serialize
|
// Serialize
|
||||||
res(await Promise.all(favorites.map(async favorite =>
|
res(await Promise.all(favorites.map(async favorite =>
|
||||||
await pack(favorite.post)
|
await pack(favorite.postId)
|
||||||
)));
|
)));
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import * as mongo from 'mongodb';
|
import * as mongo from 'mongodb';
|
||||||
import db from '../../db/mongodb';
|
import db from '../../db/mongodb';
|
||||||
|
|
||||||
const Favorites = db.get<IFavorites>('favorites');
|
const Favorites = db.get<IFavorite>('favorites');
|
||||||
export default Favorites;
|
export default Favorites;
|
||||||
|
|
||||||
export type IFavorites = {
|
export type IFavorite = {
|
||||||
_id: mongo.ObjectID;
|
_id: mongo.ObjectID;
|
||||||
createdAt: Date;
|
createdAt: Date;
|
||||||
userId: mongo.ObjectID;
|
userId: mongo.ObjectID;
|
||||||
|
|
Loading…
Reference in a new issue