Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Client
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
web-et-numerique
Factory
Resin
Client
Commits
da504660
Commit
da504660
authored
4 years ago
by
Jérémie BRISON
Browse files
Options
Downloads
Patches
Plain Diff
fix(search) : use proxy
parent
8cde8224
No related branches found
No related tags found
3 merge requests
!14
Recette
,
!13
Dev
,
!6
Topic search
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
api/routes.json
+0
-3
0 additions, 3 deletions
api/routes.json
api/server.js
+5
-1
5 additions, 1 deletion
api/server.js
src/app/structure-list/services/search.service.ts
+1
-1
1 addition, 1 deletion
src/app/structure-list/services/search.service.ts
with
6 additions
and
5 deletions
api/routes.json
deleted
100644 → 0
+
0
−
3
View file @
8cde8224
{
"/api/*"
:
"/$1"
}
This diff is collapsed.
Click to expand it.
api/server.js
+
5
−
1
View file @
da504660
const
jsonServer
=
require
(
'
json-server
'
);
const
server
=
jsonServer
.
create
();
const
router
=
jsonServer
.
router
(
'
db.json
'
);
const
middlewares
=
jsonServer
.
defaults
();
const
routes
=
{
'
/api/*
'
:
'
/$1
'
,
};
const
middlewares
=
[
jsonServer
.
defaults
(),
jsonServer
.
rewriter
(
routes
)];
// Set default middlewares (logger, static, cors and no-cache)
server
.
use
(
middlewares
);
// Add custom routes before JSON Server router
server
.
get
(
'
/structures/count
'
,
(
req
,
res
)
=>
{
console
.
log
(
'
ok
'
);
let
structureCountTab
=
[];
// Compétences de base
structureCountTab
.
push
({
id
:
260
,
count
:
3
});
...
...
This diff is collapsed.
Click to expand it.
src/app/structure-list/services/search.service.ts
+
1
−
1
View file @
da504660
...
...
@@ -17,7 +17,7 @@ export class SearchService {
.
pipe
(
map
((
data
:
any
[])
=>
data
.
map
((
item
)
=>
new
Category
(
item
))));
}
public
getFakeCounterModule
():
Observable
<
any
>
{
return
this
.
http
.
get
(
'
http://localhost:3000
/structures/count
'
);
return
this
.
http
.
get
(
'
/api
/structures/count
'
);
}
public
setCountModules
(
category
:
Category
,
structureCountTab
:
{
id
:
number
;
count
:
number
}[]):
Category
{
category
.
modules
.
forEach
((
m
:
Module
)
=>
{
...
...
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