checkpoint: pre-refactor state before fixing P0/P1 issues
This commit is contained in:
@@ -27,6 +27,11 @@ exports.main = async (event, context) => {
|
||||
updatedAt: db.serverDate(),
|
||||
}
|
||||
|
||||
// geo.near 距离查询字段;无定位时整个字段省略(写 null 会让地理索引构建失败)
|
||||
if (location && typeof location.latitude === 'number' && typeof location.longitude === 'number') {
|
||||
post.geo = db.Geo.Point(location.longitude, location.latitude)
|
||||
}
|
||||
|
||||
const res = await db.collection('posts').add({ data: post })
|
||||
|
||||
// 更新用户帖子统计
|
||||
|
||||
Reference in New Issue
Block a user