Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
gdd-sigma-poc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Guillaume WANG
gdd-sigma-poc
Commits
9c0bbf15
Commit
9c0bbf15
authored
5 years ago
by
Olivér FACKLAM
Browse files
Options
Downloads
Patches
Plain Diff
[Groups] likers
parent
4a731dd4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/graphql/object_resolvers/groups/simpleGroups.ts
+8
-1
8 additions, 1 deletion
src/graphql/object_resolvers/groups/simpleGroups.ts
src/graphql/object_resolvers/users.ts
+0
-12
0 additions, 12 deletions
src/graphql/object_resolvers/users.ts
with
8 additions
and
13 deletions
src/graphql/object_resolvers/groups/simpleGroups.ts
+
8
−
1
View file @
9c0bbf15
...
...
@@ -74,6 +74,7 @@ export class SimpleGroup extends Group {
this
.
m_members
=
data
.
members
;
this
.
m_speakers
=
data
.
speakers
;
this
.
m_admins
=
data
.
admins
;
this
.
m_likers
=
data
.
followers
;
this
.
m_parents
=
data
.
parents
;
...
...
@@ -95,6 +96,7 @@ export class SimpleGroup extends Group {
protected
m_members
:
string
[]
protected
m_speakers
:
string
[]
protected
m_admins
:
string
[]
protected
m_likers
:
string
[]
protected
m_parents
:
string
[]
/**
...
...
@@ -181,11 +183,16 @@ export class SimpleGroup extends Group {
*/
async
likers
(
args
,
context
:
Context
,
info
):
Promise
<
User
[]
>
{
if
(
context
.
models
.
auth
.
isViewer
(
this
.
gid
))
{
throw
"
Not implemented
"
;
return
this
.
getLikers
()
;
}
throw
new
AuthenticationError
(
"
Not a viewer
"
);
}
async
getLikers
():
Promise
<
User
[]
>
{
await
this
.
m_loader
.
load
();
return
this
.
m_likers
.
map
(
uid
=>
new
User
(
uid
));
}
/**
* @memberof GraphQL.SimpleGroup#
* @function frontPage
...
...
This diff is collapsed.
Click to expand it.
src/graphql/object_resolvers/users.ts
+
0
−
12
View file @
9c0bbf15
...
...
@@ -282,10 +282,6 @@ export class User {
* @async
*/
async
memberOf
(
args
,
context
:
Context
,
info
):
Promise
<
Group
[]
>
{
return
this
.
getMemberOf
();
}
async
getMemberOf
():
Promise
<
Group
[]
>
{
throw
"
Not implemented
"
;
}
...
...
@@ -358,10 +354,6 @@ export class User {
* @async
*/
async
adminOf
(
args
,
context
:
Context
,
info
):
Promise
<
Group
[]
>
{
return
this
.
getAdminOf
();
}
async
getAdminOf
():
Promise
<
Group
[]
>
{
throw
"
Not implemented
"
;
}
...
...
@@ -434,10 +426,6 @@ export class User {
* @async
*/
async
dislikes
(
args
,
context
:
Context
,
info
):
Promise
<
Group
[]
>
{
return
this
.
getDislikes
();
}
async
getDislikes
():
Promise
<
Group
[]
>
{
throw
"
Not implemented
"
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment