mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-27 17:35:07 +01:00
Move API endpoints under /api/configure/phone/ to /api/phone/
Pull out /api/configure/phone API endpoints into /api/phone for more concise and sufficiently explanatory API path Refactor Flow 1. Rename /api/configure/phone -> /api/phone
This commit is contained in:
parent
1197266912
commit
3832ef0236
2 changed files with 4 additions and 4 deletions
|
@ -336,7 +336,7 @@ def configure_routes(app):
|
||||||
if is_twilio_enabled():
|
if is_twilio_enabled():
|
||||||
from khoj.routers.api_phone import api_phone
|
from khoj.routers.api_phone import api_phone
|
||||||
|
|
||||||
app.include_router(api_phone, prefix="/api/configure/phone")
|
app.include_router(api_phone, prefix="/api/phone")
|
||||||
logger.info("📞 Enabled Twilio")
|
logger.info("📞 Enabled Twilio")
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -890,7 +890,7 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
phonenumberRemoveButton.addEventListener("click", () => {
|
phonenumberRemoveButton.addEventListener("click", () => {
|
||||||
fetch('/api/configure/phone', {
|
fetch('/api/phone', {
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
|
@ -917,7 +917,7 @@
|
||||||
}, 5000);
|
}, 5000);
|
||||||
} else {
|
} else {
|
||||||
const mobileNumber = iti.getNumber();
|
const mobileNumber = iti.getNumber();
|
||||||
fetch('/api/configure/phone?phone_number=' + mobileNumber, {
|
fetch('/api/phone?phone_number=' + mobileNumber, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
|
@ -970,7 +970,7 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
fetch('/api/configure/phone/verify?code=' + otp, {
|
fetch('/api/phone/verify?code=' + otp, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
|
|
Loading…
Reference in a new issue