Merge branch 'develop'

This commit is contained in:
syuilo
2019-04-15 13:14:58 +09:00
6 changed files with 21 additions and 1 deletions

View File

@ -122,6 +122,7 @@ export class UserRepository extends Repository<User> {
bannerUrl: user.bannerUrl,
bannerColor: user.bannerColor,
isLocked: user.isLocked,
isModerator: user.isModerator || undefined,
description: profile!.description,
location: profile!.location,
birthday: profile!.birthday,

View File

@ -48,6 +48,7 @@ export default define(meta, async (ps) => {
const hashtags = await Hashtags.createQueryBuilder('tag')
.where('tag.name like :q', { q: ps.query.toLowerCase() + '%' })
.orderBy('tag.count', 'DESC')
.groupBy('tag.id')
.take(ps.limit!)
.skip(ps.offset)
.getMany();

View File

@ -27,6 +27,7 @@ export const meta = {
export default define(meta, async (ps, user) => {
// if already subscribed
const exist = await SwSubscriptions.findOne({
createdAt: new Date(),
userId: user.id,
endpoint: ps.endpoint,
auth: ps.auth,

View File

@ -65,6 +65,10 @@ export default define(meta, async (ps, me) => {
let user;
if (ps.userIds) {
if (ps.userIds.length === 0) {
return [];
}
const users = await Users.find({
id: In(ps.userIds)
});