Skip to content

Commit

Permalink
feat: generate svg for search form inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
rabi-siddique committed Nov 22, 2024
1 parent 3169236 commit c602163
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const isValidStrategy = (strategy) => {
return validStrategies.has(strategy);
};

export const handleHeightLogs = async (req, res) => {
export const handleSearchLogs = async (req, res) => {
const { search, network, strategy } = req.body;
console.log(req.body);

Expand Down
2 changes: 1 addition & 1 deletion public/scripts/submitDateRange.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ document.getElementById('dateForm').addEventListener('submit', async (e) => {
spinner.style.display = 'inline-block';
submitButton.style.visibility = 'hidden';
try {
const response = await fetch('/submit-date-range', {
const response = await fetch('/search-logs', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Expand Down
2 changes: 1 addition & 1 deletion public/scripts/submitSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ document.getElementById('searchForm').addEventListener('submit', async (e) => {
throw new Error(`Invalid strategy selected: ${strategy}`);
}

const response = await fetch('/submit-height', {
const response = await fetch('/search-logs', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Expand Down
4 changes: 2 additions & 2 deletions router.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import express from 'express';
import { serveHomePage } from './controllers/homeController.js';
import { handleFileUpload, upload } from './controllers/uploadController.js';
import { handleDateRange } from './controllers/dateRangeController.js';
import { handleHeightLogs } from './controllers/heightController.js';
import { handleSearchLogs } from './controllers/searchLogsController.js';

const router = express.Router();

router.get('/', serveHomePage);
router.post('/upload', upload.single('file'), handleFileUpload);
router.post('/submit-date-range', handleDateRange);
router.post('/submit-height', handleHeightLogs);
router.post('/search-logs', handleSearchLogs);

export default router;

0 comments on commit c602163

Please sign in to comment.