mirror of
https://github.com/DumbWareio/DumbDrop.git
synced 2025-10-23 07:41:58 +00:00
fix: Update login API endpoint paths for authentication routes
- Modify fetch URLs to use '/api/auth/' prefix for PIN verification endpoints - Update '/api/pin-required' and '/api/verify-pin' to '/api/auth/pin-required' and '/api/auth/verify-pin' - Ensure consistent routing for authentication-related API calls Closes #31
This commit is contained in:
@@ -125,7 +125,7 @@
|
|||||||
// Handle form submission
|
// Handle form submission
|
||||||
const verifyPin = async (pin) => {
|
const verifyPin = async (pin) => {
|
||||||
try {
|
try {
|
||||||
const response = await fetch('/api/verify-pin', {
|
const response = await fetch('/api/auth/verify-pin', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify({ pin })
|
body: JSON.stringify({ pin })
|
||||||
@@ -208,7 +208,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Check PIN length and initialize
|
// Check PIN length and initialize
|
||||||
fetch('/api/pin-required')
|
fetch('/api/auth/pin-required')
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
if (data.required) {
|
if (data.required) {
|
||||||
|
Reference in New Issue
Block a user