Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
leximpact-legi-ui
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
leximpact
Exploration
leximpact-legi-ui
Commits
babae150
Commit
babae150
authored
2 months ago
by
David Smadja
Browse files
Options
Downloads
Patches
Plain Diff
Rename bill to pjl
parent
f876d902
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/routes/api/pjl/[pjl]/+server.ts
+3
-3
3 additions, 3 deletions
src/routes/api/pjl/[pjl]/+server.ts
src/routes/pjl/[pjl]/+page.svelte
+0
-0
0 additions, 0 deletions
src/routes/pjl/[pjl]/+page.svelte
src/routes/pjl/[pjl]/+page.ts
+3
-3
3 additions, 3 deletions
src/routes/pjl/[pjl]/+page.ts
with
6 additions
and
6 deletions
src/routes/api/
bill/[bil
l]/+server.ts
→
src/routes/api/
pjl/[pj
l]/+server.ts
+
3
−
3
View file @
babae150
...
...
@@ -4,9 +4,9 @@ import fs from "fs/promises"
import
path
from
"
path
"
export
const
GET
:
RequestHandler
=
async
({
params
,
url
})
=>
{
const
{
bil
l
}
=
params
as
{
bil
l
:
string
}
const
{
pj
l
}
=
params
as
{
pj
l
:
string
}
const
filePath
=
path
.
resolve
(
`static/
${
bil
l
}
.html`
)
const
filePath
=
path
.
resolve
(
`static/
${
pj
l
}
.html`
)
try
{
const
html
=
await
fs
.
readFile
(
filePath
,
"
utf-8
"
)
...
...
@@ -26,7 +26,7 @@ export const GET: RequestHandler = async ({ params, url }) => {
/<a href="https:
\/\/
git
\.
tricoteuses
\.
fr.+
\/([^/]
+
\.
md
)
">
([^
<
]
+
)
<
\/
a>/g
,
(
match
,
p1
,
p2
)
=>
{
const
lawArticle
=
p1
.
replace
(
"
.md
"
,
""
)
return
`<a href='
${
url
.
origin
}
/
bil
l/
${
bil
l
}
?lawArticle=
${
lawArticle
}
'>
${
p2
}
</a>`
return
`<a href='
${
url
.
origin
}
/
pj
l/
${
pj
l
}
?lawArticle=
${
lawArticle
}
'>
${
p2
}
</a>`
},
)
return
new
Response
(
htmlWithLinks
,
{
...
...
This diff is collapsed.
Click to expand it.
src/routes/
bill/[bil
l]/+page.svelte
→
src/routes/
pjl/[pj
l]/+page.svelte
+
0
−
0
View file @
babae150
File moved
This diff is collapsed.
Click to expand it.
src/routes/
bill/[bil
l]/+page.ts
→
src/routes/
pjl/[pj
l]/+page.ts
+
3
−
3
View file @
babae150
...
...
@@ -4,10 +4,10 @@ export const load: PageLoad = async ({
fetch
,
params
,
}):
Promise
<
{
billHTML
:
string
|
undefined
}
>
=>
{
const
bil
l
=
params
.
bil
l
const
pj
l
=
params
.
pj
l
if
(
bil
l
!==
undefined
)
{
const
res
=
await
fetch
(
`/api/
bil
l/
${
bil
l
}
`
,
{
if
(
pj
l
!==
undefined
)
{
const
res
=
await
fetch
(
`/api/
pj
l/
${
pj
l
}
`
,
{
headers
:
{
Accept
:
"
text/html
"
,
"
Content-Type
"
:
"
text/html; charset=utf-8
"
,
...
...
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