Skip to content

Commit

Permalink
Clean up (#24)
Browse files Browse the repository at this point in the history
* update leagues service

	- update swagger docs
	- update controller
	- update response payload

* added hono client components

* stick with tailwindcss and daisyui

	- using vite for hot module reloading server

* demo ui

	- work in progress
  • Loading branch information
mr-wellick authored Sep 23, 2024
1 parent 3b4b892 commit a875f20
Show file tree
Hide file tree
Showing 14 changed files with 2,005 additions and 245 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
.idea/usage.statistics.xml
.idea/shelf

# prod build
dist/

# deps
node_modules/

Expand Down
47 changes: 36 additions & 11 deletions doc/leaguesDoc.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,53 @@
export const leaguesDoc = {
"/api/v1/leagues": {
get: {
summary: "HMTX View",
description:
"Returns an html view with leagues array or an html error view.",
summary: "Leagues Controller",
description: "Query leagues table.",
responses: {
200: {
description: "A successful response",
description: "A successful query to leagues table.",
content: {
"text/html": {
"application/json": {
schema: {
type: "string",
example: "<select><option>Liga MX</option></select>",
type: "array",
items: {
type: "object",
properties: {
league_id: {
type: "string",
},
league_name: {
type: "string",
},
country_id: {
type: "string",
},
division: {
type: "string",
},
},
},
example: [
{
league_id: "81fd5d4e-d500-413f-881d-6ec5cd2d5222",
league_name: "english premier league",
country_id: "c2eefade-d29b-4378-8c1c-53eae0283805",
division: "ENG.1",
},
],
},
},
},
},
// TODO
500: {
description: "A bad response",
description: "An unsuccessful query to leagues table.",
content: {
"text/html": {
"application/json": {
schema: {
type: "string",
example: "<p>Unable to retrieve leagues view. Try again.</p>",
type: "array",
properties: {},
example: [],
},
},
},
Expand Down
13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/src/public/output.css">
<title>Footy</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/views/app.tsx"></script>
</body>
</html>
Loading

0 comments on commit a875f20

Please sign in to comment.