Merge branch 'develop'
This commit is contained in:
commit
a05f5a91b8
6 changed files with 21 additions and 1 deletions
|
@ -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,
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue