Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WIE_202021_CSBillero11
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Bernard Roland (Student Com20)
WIE_202021_CSBillero11
Commits
3873eb22
Commit
3873eb22
authored
3 years ago
by
Bernard Roland (Student Com20)
Browse files
Options
Downloads
Patches
Plain Diff
Implemented a new adapter method for the new API path
parent
85d4d7e0
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
client/src/adapters/project.ts
+1
-5
1 addition, 5 deletions
client/src/adapters/project.ts
client/src/adapters/task.ts
+5
-0
5 additions, 0 deletions
client/src/adapters/task.ts
client/src/adapters/user.ts
+4
-0
4 additions, 0 deletions
client/src/adapters/user.ts
with
10 additions
and
5 deletions
client/src/adapters/project.ts
+
1
−
5
View file @
3873eb22
import
{
executeApiGet
,
executeApiPost
,
executeApiPut
}
from
'
./util
'
;
import
{
Task
}
from
'
./task
'
;
import
{
User
}
from
'
./user
'
;
import
{
Assigned
User
}
from
'
./user
'
;
import
{
Work
}
from
'
./work
'
;
export
interface
Project
{
...
...
@@ -14,10 +14,6 @@ export interface Project {
teams
:
Array
<
string
>
;
}
export
interface
AssignedUser
extends
User
{
time
:
number
;
}
export
type
ReducedProject
=
Exclude
<
Project
,
'
teams
'
>
;
export
function
getProjects
():
Promise
<
ReducedProject
[]
>
{
...
...
This diff is collapsed.
Click to expand it.
client/src/adapters/task.ts
+
5
−
0
View file @
3873eb22
...
...
@@ -2,6 +2,7 @@
import
{
executeApiGet
,
executeApiPost
,
executeApiPut
}
from
'
./util
'
;
import
{
Comment
}
from
'
./comment
'
;
import
{
Work
}
from
'
./work
'
;
import
{
AssignedUser
}
from
'
./user
'
;
export
interface
TaskRequirement
{
role
:
string
;
...
...
@@ -77,6 +78,10 @@ export function getTaskWork(uuid: string): Promise<Work[]> {
})),
"
Failed to get task work
"
);
}
export
function
getTaskAssignees
(
uuid
:
string
):
Promise
<
AssignedUser
[]
>
{
return
executeApiGet
(
`task/
${
uuid
}
/assigned`
,
({
assigned
})
=>
assigned
,
"
Failed to get task assignees
"
);
}
interface
AddTaskBody
{
project
:
string
;
name
:
string
;
...
...
This diff is collapsed.
Click to expand it.
client/src/adapters/user.ts
+
4
−
0
View file @
3873eb22
...
...
@@ -12,6 +12,10 @@ export interface User {
email
?:
string
;
}
export
interface
AssignedUser
extends
User
{
time
:
number
;
}
export
async
function
exists
(
username
:
string
)
{
try
{
const
response
=
await
fetch
(
`
${
apiRoot
}
/user/name/
${
username
}
`
);
...
...
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