feat: profile - pages
This commit is contained in:
@@ -97,6 +97,18 @@ module.exports = {
|
||||
if (args.locale) {
|
||||
queryBuilder.where('localeCode', args.locale)
|
||||
}
|
||||
if (args.creatorId && args.authorId && args.creatorId > 0 && args.authorId > 0) {
|
||||
queryBuilder.where(function () {
|
||||
this.where('creatorId', args.creatorId).orWhere('authorId', args.authorId)
|
||||
})
|
||||
} else {
|
||||
if (args.creatorId && args.creatorId > 0) {
|
||||
queryBuilder.where('creatorId', args.creatorId)
|
||||
}
|
||||
if (args.authorId && args.authorId > 0) {
|
||||
queryBuilder.where('authorId', args.authorId)
|
||||
}
|
||||
}
|
||||
if (args.tags && args.tags.length > 0) {
|
||||
queryBuilder.whereIn('tags.tag', args.tags)
|
||||
}
|
||||
|
@@ -38,6 +38,8 @@ type PageQuery {
|
||||
orderByDirection: PageOrderByDirection
|
||||
tags: [String!]
|
||||
locale: String
|
||||
creatorId: Int
|
||||
authorId: Int
|
||||
): [PageListItem!]! @auth(requires: ["manage:system", "read:pages"])
|
||||
|
||||
single(
|
||||
|
Reference in New Issue
Block a user