Skip to content

Commit

Permalink
Updated routes
Browse files Browse the repository at this point in the history
  • Loading branch information
svera committed Sep 8, 2024
1 parent c443408 commit b581857
Show file tree
Hide file tree
Showing 14 changed files with 57 additions and 56 deletions.
9 changes: 6 additions & 3 deletions internal/webserver/controller/document/send.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package document

import (
"log"
"net/mail"
"os"
"path/filepath"
Expand All @@ -10,21 +11,23 @@ import (
)

func (d *Controller) Send(c *fiber.Ctx) error {
if strings.Trim(c.FormValue("slug"), " ") == "" {
slug := ""
if slug = strings.Trim(c.Params("slug"), " "); slug == "" {
return fiber.ErrBadRequest
}

if _, err := mail.ParseAddress(c.FormValue("email")); err != nil {
return fiber.ErrBadRequest
}

document, err := d.idx.Document(c.FormValue("slug"))
document, err := d.idx.Document(slug)
if err != nil {
return fiber.ErrBadRequest
}

if _, err := os.Stat(filepath.Join(d.config.LibraryPath, document.ID)); err != nil {
return fiber.ErrBadRequest
log.Println(err)
return fiber.ErrInternalServerError
}

return d.sender.SendDocument(c.FormValue("email"), d.config.LibraryPath, document.ID)
Expand Down
5 changes: 2 additions & 3 deletions internal/webserver/embedded/js/send-email.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ Array.from(forms).forEach(form => {
submit.setAttribute("disabled", true);
spinner.classList.remove("visually-hidden");
sendIcon.classList.add("visually-hidden");
fetch('/send', {
fetch(form.getAttribute("action"), {
method: "POST",
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({
'email': form.elements[0].value,
'slug': form.elements[1].value,
'email': form.elements[0].value
})
})
.then((response) => {
Expand Down
10 changes: 5 additions & 5 deletions internal/webserver/embedded/views/document.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="row mt-5">
<div class="col-md-4 col-sm-12 pe-3">
<div class="card border border-0">
<img src="/images/generic.jpg" data-src="/documents/{{.Document.Slug}}/cover" loading="lazy"
<img src="/images/generic.jpg" data-src="/{{$lang}}/documents/{{.Document.Slug}}/cover" loading="lazy"
class="border border-2 mb-3 cover img-fluid"
alt='{{t $lang "\"%s\" cover" .Document.Title}}'>

Expand All @@ -23,15 +23,15 @@ <h3 class="card-text text-center mx-1 mt-3">
</div>
</div>
<div class="d-grid gap-2 mb-5 actions">
<a href="/{{$lang}}/documents/{{.Document.Slug}}/read" class="btn btn-primary">
<a href="/{{.Lang}}/documents/{{.Document.Slug}}/read" class="btn btn-primary">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye-fill" viewBox="0 0 16 16">
<path d="M10.5 8a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0z"/>
<path d="M0 8s3-5.5 8-5.5S16 8 16 8s-3 5.5-8 5.5S0 8 0 8zm8 3.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7z"/>
</svg>
&nbsp;&nbsp;{{t .Lang "Read"}}
</a>

<a href="/documents/{{.Document.Slug}}/download" class="btn btn-outline-secondary" download>
<a href="/{{.Lang}}/documents/{{.Document.Slug}}/download" class="btn btn-outline-secondary" download>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-cloud-download" viewBox="0 0 16 16">
<path d="M4.406 1.342A5.53 5.53 0 0 1 8 0c2.69 0 4.923 2 5.166 4.579C14.758 4.804 16 6.137 16 7.773 16 9.569 14.502 11 12.687 11H10a.5.5 0 0 1 0-1h2.688C13.979 10 15 8.988 15 7.773c0-1.216-1.02-2.228-2.313-2.228h-.5v-.5C12.188 2.825 10.328 1 8 1a4.53 4.53 0 0 0-2.941 1.1c-.757.652-1.153 1.438-1.153 2.055v.448l-.445.049C2.064 4.805 1 5.952 1 7.318 1 8.785 2.23 10 3.781 10H6a.5.5 0 0 1 0 1H3.781C1.708 11 0 9.366 0 7.318c0-1.763 1.266-3.223 2.942-3.593.143-.863.698-1.723 1.464-2.383z"/>
<path d="M7.646 15.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 14.293V5.5a.5.5 0 0 0-1 0v8.793l-2.146-2.147a.5.5 0 0 0-.708.708l3 3z"/>
Expand All @@ -40,7 +40,7 @@ <h3 class="card-text text-center mx-1 mt-3">
<span class='badge text-bg-{{if eq .Document.Type "EPUB"}}primary{{else}}danger{{end}}'>{{.Document.Type}}</span>
</a>

<a href="/documents/{{.Document.Slug}}/download?format=kepub" class="btn btn-outline-secondary" download>
<a href="/{{.Lang}}/documents/{{.Document.Slug}}/download?format=kepub" class="btn btn-outline-secondary" download>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-cloud-download" viewBox="0 0 16 16">
<path d="M4.406 1.342A5.53 5.53 0 0 1 8 0c2.69 0 4.923 2 5.166 4.579C14.758 4.804 16 6.137 16 7.773 16 9.569 14.502 11 12.687 11H10a.5.5 0 0 1 0-1h2.688C13.979 10 15 8.988 15 7.773c0-1.216-1.02-2.228-2.313-2.228h-.5v-.5C12.188 2.825 10.328 1 8 1a4.53 4.53 0 0 0-2.941 1.1c-.757.652-1.153 1.438-1.153 2.055v.448l-.445.049C2.064 4.805 1 5.952 1 7.318 1 8.785 2.23 10 3.781 10H6a.5.5 0 0 1 0 1H3.781C1.708 11 0 9.366 0 7.318c0-1.763 1.266-3.223 2.942-3.593.143-.863.698-1.723 1.464-2.383z"/>
<path d="M7.646 15.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 14.293V5.5a.5.5 0 0 0-1 0v8.793l-2.146-2.147a.5.5 0 0 0-.708.708l3 3z"/>
Expand Down Expand Up @@ -69,7 +69,7 @@ <h3 class="card-text text-center mx-1 mt-3">
<p class="text-start">{{t .Lang "Send to email unavailable, no email service configured"}}</p>
{{else}}
<div>
<form method="post" action="send" data-success-message='{{t .Lang "Document sent successfully"}}' data-error-message='{{t .Lang "There was an error sending the document, please try again later"}}' class="send-email mt-3">
<form method="post" action="/{{.Lang}}/documents/{{.Document.Slug}}/send" data-success-message='{{t .Lang "Document sent successfully"}}' data-error-message='{{t .Lang "There was an error sending the document, please try again later"}}' class="send-email mt-3">
<label for="email" class="form-label text-start">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-envelope-fill" viewBox="0 0 16 16">
<path d="M.05 3.555A2 2 0 0 1 2 2h12a2 2 0 0 1 1.95 1.555L8 8.414.05 3.555ZM0 4.697v7.104l5.803-3.558L0 4.697ZM6.761 8.83l-6.57 4.027A2 2 0 0 0 2 14h12a2 2 0 0 0 1.808-1.144l-6.57-4.027L8 9.586l-1.239-.757Zm3.436-.586L16 11.801V4.697l-5.803 3.546Z"/>
Expand Down
7 changes: 3 additions & 4 deletions internal/webserver/embedded/views/partials/actions.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
&nbsp;&nbsp;{{t .Lang "Read"}}
</a>
</li>
<li><a href="/documents/{{.Document.Slug}}/download" class="dropdown-item" download>
<li><a href="/{{.Lang}}/documents/{{.Document.Slug}}/download" class="dropdown-item" download>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-cloud-download" viewBox="0 0 16 16">
<path d="M4.406 1.342A5.53 5.53 0 0 1 8 0c2.69 0 4.923 2 5.166 4.579C14.758 4.804 16 6.137 16 7.773 16 9.569 14.502 11 12.687 11H10a.5.5 0 0 1 0-1h2.688C13.979 10 15 8.988 15 7.773c0-1.216-1.02-2.228-2.313-2.228h-.5v-.5C12.188 2.825 10.328 1 8 1a4.53 4.53 0 0 0-2.941 1.1c-.757.652-1.153 1.438-1.153 2.055v.448l-.445.049C2.064 4.805 1 5.952 1 7.318 1 8.785 2.23 10 3.781 10H6a.5.5 0 0 1 0 1H3.781C1.708 11 0 9.366 0 7.318c0-1.763 1.266-3.223 2.942-3.593.143-.863.698-1.723 1.464-2.383z"/>
<path d="M7.646 15.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 14.293V5.5a.5.5 0 0 0-1 0v8.793l-2.146-2.147a.5.5 0 0 0-.708.708l3 3z"/>
Expand All @@ -16,7 +16,7 @@
<span class='badge text-bg-{{if eq .Document.Type "EPUB"}}primary{{else}}danger{{end}}'>{{.Document.Type}}</span>
</a>
</li>
<li><a href="/documents/{{.Document.Slug}}/download?format=kepub" class="dropdown-item" download>
<li><a href="/{{.Lang}}/documents/{{.Document.Slug}}/download?format=kepub" class="dropdown-item" download>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-cloud-download" viewBox="0 0 16 16">
<path d="M4.406 1.342A5.53 5.53 0 0 1 8 0c2.69 0 4.923 2 5.166 4.579C14.758 4.804 16 6.137 16 7.773 16 9.569 14.502 11 12.687 11H10a.5.5 0 0 1 0-1h2.688C13.979 10 15 8.988 15 7.773c0-1.216-1.02-2.228-2.313-2.228h-.5v-.5C12.188 2.825 10.328 1 8 1a4.53 4.53 0 0 0-2.941 1.1c-.757.652-1.153 1.438-1.153 2.055v.448l-.445.049C2.064 4.805 1 5.952 1 7.318 1 8.785 2.23 10 3.781 10H6a.5.5 0 0 1 0 1H3.781C1.708 11 0 9.366 0 7.318c0-1.763 1.266-3.223 2.942-3.593.143-.863.698-1.723 1.464-2.383z"/>
<path d="M7.646 15.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 14.293V5.5a.5.5 0 0 0-1 0v8.793l-2.146-2.147a.5.5 0 0 0-.708.708l3 3z"/>
Expand Down Expand Up @@ -49,7 +49,7 @@
<li class="dropdown-item disabled">{{t .Lang "Send to email unavailable, no email service configured"}}</li>
{{else}}
<li>
<form method="post" action="send" data-success-message='{{t .Lang "Document sent successfully"}}' data-error-message='{{t .Lang "There was an error sending the document, please try again later"}}' class="send-email">
<form method="post" action="/{{.Lang}}/documents/{{.Document.Slug}}/send" data-success-message='{{t .Lang "Document sent successfully"}}' data-error-message='{{t .Lang "There was an error sending the document, please try again later"}}' class="send-email">
<div class="px-3 py-1">
<label for="email" class="form-label">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-envelope-fill" viewBox="0 0 16 16">
Expand All @@ -60,7 +60,6 @@
<div class="input-group">
<input type="email" class="form-control" id="email" name="email"
placeholder="email@example.com" value="{{if .Session}}{{.Session.SendToEmail}}{{end}}" required="required">
<input type="hidden" name="slug" value="{{.Document.Slug}}">
<button type="submit" class="btn btn-primary">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-send-fill" viewBox="0 0 16 16">
<path d="M15.964.686a.5.5 0 0 0-.65-.65L.767 5.855H.766l-.452.18a.5.5 0 0 0-.082.887l.41.26.001.002 4.995 3.178 3.178 4.995.002.002.26.41a.5.5 0 0 0 .886-.083l6-15Zm-1.833 1.89L6.637 10.07l-.215-.338a.5.5 0 0 0-.154-.154l-.338-.215 7.494-7.494 1.178-.471-.47 1.178Z"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="modal fade" id="delete-modal" tabindex="-1" aria-labelledby="delete-modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<form action="{{.Action}}" data-error-message='{{t .Lang .ModalErrorMessage}}' id="delete-form">
<form action="/{{.Lang}}/{{.Action}}" data-error-message='{{t .Lang .ModalErrorMessage}}' id="delete-form">
<div class="modal-header">
<h1 class="modal-title fs-5" id="delete-modal-label">{{t .Lang .ModalHeader}}</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
Expand Down
4 changes: 2 additions & 2 deletions internal/webserver/embedded/views/partials/docs-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="list-group-item">
<div class="row">
<div class="card col-lg-2 col-md-3 col-sm-12 border border-0">
<img src="/images/generic.jpg" data-src="/documents/{{$document.Slug}}/cover" loading="lazy" class="border border-2 text-center mb-3 cover img-fluid card-img" alt='{{t $lang "\"%s\" cover" $document.Title}}'>
<img src="/images/generic.jpg" data-src="/{{$lang}}/documents/{{$document.Slug}}/cover" loading="lazy" class="border border-2 text-center mb-3 cover img-fluid card-img" alt='{{t $lang "\"%s\" cover" $document.Title}}'>
<div class="card-img-overlay">
<h5 class="card-title text-center mx-1">{{$document.Title}}</h5>
<p class="card-text text-center mx-1">
Expand Down Expand Up @@ -91,7 +91,7 @@ <h5>{{t $lang "Unknown author"}}</h5>
{{end}} {{end}}
</div>

{{template "partials/delete-modal" dict "Lang" $lang "Action" "/documents" "ModalHeader" "Delete document" "ModalBody" "Are you sure you want to delete this document?" "ModalErrorMessage" "There was an error deleting the document"}}
{{template "partials/delete-modal" dict "Lang" $lang "Action" "documents" "ModalHeader" "Delete document" "ModalBody" "Are you sure you want to delete this document?" "ModalErrorMessage" "There was an error deleting the document"}}

<script type="text/javascript" src="/js/send-email.js"></script>
<script type="text/javascript" src="/js/delete.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion internal/webserver/embedded/views/partials/related.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="card border-0">
<img src="/images/generic.jpg" data-src="/documents/{{.Document.Slug}}/cover" loading="lazy" class="card-img-top border border-1 rounded-0 cover mb-3" alt='{{t .Lang "\"%s\" cover" .Document.Title}}'>
<img src="/images/generic.jpg" data-src="/{{.Lang}}/documents/{{.Document.Slug}}/cover" loading="lazy" class="card-img-top border border-1 rounded-0 cover mb-3" alt='{{t .Lang "\"%s\" cover" .Document.Title}}'>
<div class="card-img-overlay card-body">
<h5 class="card-title text-center"><a href="/{{.Lang}}/documents/{{.Document.Slug}}" class="stretched-link text-decoration-none">{{.Document.Title}}</a></h5>
{{if .Document.Authors}}
Expand Down
2 changes: 1 addition & 1 deletion internal/webserver/embedded/views/reader.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<meta name="msapplication-TileColor" content="#da532c">
<link href="/css/reader.css" rel="stylesheet">

<input type="hidden" id="url" value="{{.fqdn}}/documents/{{.Slug}}/download">
<input type="hidden" id="url" value="{{.fqdn}}/{{.Lang}}/documents/{{.Slug}}/download">
<input type="hidden" id="slug" value="{{.Slug}}">

<div id="spinner-container" class="filter">
Expand Down
2 changes: 1 addition & 1 deletion internal/webserver/embedded/views/users/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ <h2>{{t $lang "Users"}}</h2>
{{template "partials/pagination" .}}
{{end}}

{{template "partials/delete-modal" dict "Lang" $lang "Action" "/users" "ModalHeader" "Delete user" "ModalBody" "Are you sure you want to delete this user?" "ModalErrorMessage" "There was an error deleting the user, try again later"}}
{{template "partials/delete-modal" dict "Lang" $lang "Action" "users" "ModalHeader" "Delete user" "ModalBody" "Are you sure you want to delete this user?" "ModalErrorMessage" "There was an error deleting the user, try again later"}}

<script type="text/javascript" src="/js/delete.js"></script>
6 changes: 3 additions & 3 deletions internal/webserver/highlights_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func TestHighlights(t *testing.T) {
t.Fatalf("Unexpected error: %v", err.Error())
}

_, err = deleteRequest(url.Values{}, adminCookie, app, "/documents/john-doe-test-epub", t)
_, err = deleteRequest(url.Values{}, adminCookie, app, "/en/documents/john-doe-test-epub", t)
if err != nil {
t.Fatalf("Unexpected error: %v", err.Error())
}
Expand Down Expand Up @@ -150,7 +150,7 @@ func TestHighlights(t *testing.T) {
t.Fatalf("Unexpected error: %v", err.Error())
}

_, err = deleteRequest(url.Values{}, adminCookie, app, fmt.Sprintf("/users/%s", regularUser.Username), t)
_, err = deleteRequest(url.Values{}, adminCookie, app, fmt.Sprintf("/en/users/%s", regularUser.Username), t)
if err != nil {
t.Fatalf("Unexpected error: %v", err.Error())
}
Expand All @@ -165,7 +165,7 @@ func TestHighlights(t *testing.T) {

func highlight(cookie *http.Cookie, app *fiber.App, slug string, method string, t *testing.T) (*http.Response, error) {
t.Helper()
req, err := http.NewRequest(method, fmt.Sprintf("/highlights/%s", slug), nil)
req, err := http.NewRequest(method, fmt.Sprintf("/en/highlights/%s", slug), nil)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion internal/webserver/remove_document_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func TestRemoveDocument(t *testing.T) {
t.Fatalf("Unexpected error: %v", err.Error())
}

response, err = deleteRequest(url.Values{}, cookie, app, fmt.Sprintf("/documents/%s", tcase.slug), t)
response, err = deleteRequest(url.Values{}, cookie, app, fmt.Sprintf("/en/documents/%s", tcase.slug), t)
if err != nil {
t.Fatalf("Unexpected error: %v", err.Error())
}
Expand Down
48 changes: 25 additions & 23 deletions internal/webserver/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ import (
)

func routes(app *fiber.App, controllers Controllers, jwtSecret []byte, sender Sender, requireAuth bool) {
var allowIfNotLoggedIn = AllowIfNotLoggedIn(jwtSecret)
var alwaysRequireAuthentication = AlwaysRequireAuthentication(jwtSecret, sender)
var configurableAuthentication = ConfigurableAuthentication(jwtSecret, sender, requireAuth)
// Middlewares
var (
allowIfNotLoggedIn = AllowIfNotLoggedIn(jwtSecret)
alwaysRequireAuthentication = AlwaysRequireAuthentication(jwtSecret, sender)
configurableAuthentication = ConfigurableAuthentication(jwtSecret, sender, requireAuth)
)

app.Use("/css", filesystem.New(filesystem.Config{
Root: http.FS(cssFS),
Expand Down Expand Up @@ -54,35 +57,34 @@ func routes(app *fiber.App, controllers Controllers, jwtSecret []byte, sender Se

usersGroup := langGroup.Group("/users", alwaysRequireAuthentication)

usersGroup.Get("/", alwaysRequireAuthentication, RequireAdmin, controllers.Users.List)
usersGroup.Get("/new", alwaysRequireAuthentication, RequireAdmin, controllers.Users.New)
usersGroup.Post("/", alwaysRequireAuthentication, RequireAdmin, controllers.Users.Create)
usersGroup.Get("/:username", alwaysRequireAuthentication, controllers.Users.Edit)
usersGroup.Put("/:username", alwaysRequireAuthentication, controllers.Users.Update)
app.Delete("/users/:username", alwaysRequireAuthentication, RequireAdmin, controllers.Users.Delete)
usersGroup.Get("/", RequireAdmin, controllers.Users.List)
usersGroup.Get("/new", RequireAdmin, controllers.Users.New)
usersGroup.Post("/", RequireAdmin, controllers.Users.Create)
usersGroup.Get("/:username", controllers.Users.Edit)
usersGroup.Put("/:username", controllers.Users.Update)
usersGroup.Delete("/:username", RequireAdmin, controllers.Users.Delete)

langGroup.Get("/highlights", alwaysRequireAuthentication, controllers.Highlights.List)
app.Post("/highlights/:slug", alwaysRequireAuthentication, controllers.Highlights.Create)
app.Delete("/highlights/:slug", alwaysRequireAuthentication, controllers.Highlights.Delete)

app.Delete("/documents/:slug", alwaysRequireAuthentication, RequireAdmin, controllers.Documents.Delete)
highlightsGroup := langGroup.Group("/highlights", alwaysRequireAuthentication)
highlightsGroup.Get("/", controllers.Highlights.List)
highlightsGroup.Post("/:slug", controllers.Highlights.Create)
highlightsGroup.Delete("/:slug", controllers.Highlights.Delete)

docsGroup := langGroup.Group("/documents")
langGroup.Get("/upload", alwaysRequireAuthentication, RequireAdmin, controllers.Documents.UploadForm)
langGroup.Post("/documents", alwaysRequireAuthentication, RequireAdmin, controllers.Documents.Upload)
docsGroup.Post("/", alwaysRequireAuthentication, RequireAdmin, controllers.Documents.Upload)
docsGroup.Delete("/:slug", alwaysRequireAuthentication, RequireAdmin, controllers.Documents.Delete)

// Authentication requirement is configurable for all routes below this middleware
langGroup.Use(configurableAuthentication)
app.Use(configurableAuthentication)

app.Get("/documents/:slug/cover", controllers.Documents.Cover)
langGroup.Get("/documents/:slug/read", controllers.Documents.Reader)
app.Get("/documents/:slug/download", controllers.Documents.Download)

langGroup.Get("/documents/:slug", controllers.Documents.Detail)

app.Post("/send", controllers.Documents.Send)
docsGroup.Get("/:slug/cover", controllers.Documents.Cover)
docsGroup.Get("/:slug/read", controllers.Documents.Reader)
docsGroup.Get("/:slug/download", controllers.Documents.Download)
docsGroup.Post("/:slug/send", controllers.Documents.Send)
docsGroup.Get("/:slug", controllers.Documents.Detail)
docsGroup.Get("/", controllers.Documents.Search)

langGroup.Get("/documents", controllers.Documents.Search)
langGroup.Get("/", controllers.Documents.Search)

app.Get("/", func(c *fiber.Ctx) error {
Expand Down
Loading

0 comments on commit b581857

Please sign in to comment.