fix copy command

This commit is contained in:
maddalax 2024-09-13 16:45:12 -05:00
parent cc9d489fe1
commit 09daf70ffb
2 changed files with 9 additions and 9 deletions

View file

@ -33,8 +33,8 @@ tasks:
desc: Build the project desc: Build the project
cmds: cmds:
- rm -rf ./dist - rm -rf ./dist
- mkdir -p ./dist/assets - mkdir -p ./dist/assets/dist
- cp -r ./assets ./dist/assets - cp -r ./assets/dist/* ./dist/assets/dist/
- go build -o "./dist" . - go build -o "./dist" .
- echo "Build successful" - echo "Build successful"

View file

@ -9,25 +9,25 @@ import "starter-template/partials/sheet"
func GetPartialFromContext(ctx *fiber.Ctx) *h.Partial { func GetPartialFromContext(ctx *fiber.Ctx) *h.Partial {
path := ctx.Path() path := ctx.Path()
if path == "NewsSheet" || path == "/github.com/maddalax/mhtml/starter-template/partials.NewsSheet" { if path == "NewsSheet" || path == "/starter-template/partials.NewsSheet" {
return partials.NewsSheet(ctx) return partials.NewsSheet(ctx)
} }
if path == "NewsSheetOpenCount" || path == "/github.com/maddalax/mhtml/starter-template/partials.NewsSheetOpenCount" { if path == "NewsSheetOpenCount" || path == "/starter-template/partials.NewsSheetOpenCount" {
return partials.NewsSheetOpenCount(ctx) return partials.NewsSheetOpenCount(ctx)
} }
if path == "Create" || path == "/github.com/maddalax/mhtml/starter-template/partials/patient.Create" { if path == "Create" || path == "/starter-template/partials/patient.Create" {
return patient.Create(ctx) return patient.Create(ctx)
} }
if path == "List" || path == "/github.com/maddalax/mhtml/starter-template/partials/patient.List" { if path == "List" || path == "/starter-template/partials/patient.List" {
return patient.List(ctx) return patient.List(ctx)
} }
if path == "AddPatientSheetPartial" || path == "/github.com/maddalax/mhtml/starter-template/partials/patient.AddPatientSheetPartial" { if path == "AddPatientSheetPartial" || path == "/starter-template/partials/patient.AddPatientSheetPartial" {
return patient.AddPatientSheetPartial(ctx) return patient.AddPatientSheetPartial(ctx)
} }
if path == "ValidateForm" || path == "/github.com/maddalax/mhtml/starter-template/partials/patient.ValidateForm" { if path == "ValidateForm" || path == "/starter-template/partials/patient.ValidateForm" {
return patient.ValidateForm(ctx) return patient.ValidateForm(ctx)
} }
if path == "Close" || path == "/github.com/maddalax/mhtml/starter-template/partials/sheet.Close" { if path == "Close" || path == "/starter-template/partials/sheet.Close" {
return sheet.Close(ctx) return sheet.Close(ctx)
} }
return nil return nil