-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: can now schedule meetings as a user
Barebones Vue front end has been implemented, and allows for candidates to schedule a meeting time based on the meeting's hosts' preferences.
- Loading branch information
1 parent
5aa6c45
commit 767e773
Showing
41 changed files
with
12,899 additions
and
308 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package application | ||
|
||
import ( | ||
"log" | ||
"net/http" | ||
"os" | ||
"path/filepath" | ||
|
||
"github.com/go-chi/chi/middleware" | ||
) | ||
|
||
func (a *App) loadRoutes() { | ||
a.router.Use(middleware.Logger) | ||
a.router.Get("/helloworld", func(w http.ResponseWriter, _ *http.Request) { | ||
_, writeErr := w.Write([]byte("Hello, World!")) | ||
if writeErr != nil { | ||
log.Printf("Error writing response: %v", writeErr) | ||
} | ||
}) | ||
|
||
a.router.Get("/api/meetings", a.meetingController.GetAllMeetings) | ||
a.router.Get("/api/meeting", a.meetingController.GetMeetingByID) | ||
a.router.Get("/api/meeting/time-slots", a.meetingController.GetAvailableTimeBlocks) | ||
a.router.Post("/api/meeting/schedule", a.meetingController.UpdateMeetingTime) | ||
|
||
// Handle frontend route | ||
workDir, _ := os.Getwd() | ||
filesDir := http.Dir(filepath.Join(workDir, "frontend")) | ||
a.router.Handle("/", http.FileServer(filesDir)) // Serve index.html at root | ||
a.router.Handle("/*", http.StripPrefix("/", http.FileServer(filesDir))) // Serve static files | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.