Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename the internal api to avoid conflicts with hass #293

Merged
merged 1 commit into from
Jan 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/Components/CustomJs.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

onMount(async () => {
try {
const response = await fetch(`${base}/api/custom_js`);
const response = await fetch(`${base}/_api/custom_js`);
const data = await response.json();

if (response.ok) {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Components/Theme.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*/
async function loadTheme(name: string) {
try {
const response = await fetch(`${base}/api/load_theme`, {
const response = await fetch(`${base}/_api/load_theme`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Drawer/AppearanceButton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
module.default;

try {
const response = await fetch(`${base}/api/get_all_themes`);
const response = await fetch(`${base}/_api/get_all_themes`);
const data = await response.json();

if (response.ok) {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Drawer/SaveButton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
if (!modified) return;

try {
const response = await fetch(`${base}/api/save_dashboard`, {
const response = await fetch(`${base}/_api/save_dashboard`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify($dashboard)
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Main/Intro.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
$selectedLanguage = value;

try {
const response = await fetch(`${base}/api/get_translation`, {
const response = await fetch(`${base}/_api/get_translation`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Modal/AppearanceConfig.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
// load themes if not prop has already loaded
if (!themes) {
try {
const response = await fetch(`${base}/api/get_all_themes`);
const response = await fetch(`${base}/_api/get_all_themes`);
const data = await response.json();

if (response.ok) {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Modal/CodeConfig.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
}

try {
const response = await fetch(`${base}/api/save_dashboard`, {
const response = await fetch(`${base}/_api/save_dashboard`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(_value)
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Settings/Index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
$motion = 190;
}

const response = await fetch(`${base}/api/save_config`, {
const response = await fetch(`${base}/_api/save_config`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
Expand Down
4 changes: 2 additions & 2 deletions src/lib/Settings/Language.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
};

try {
const response = await fetch(`${base}/api/list_languages`);
const response = await fetch(`${base}/_api/list_languages`);
const data = await response.json();

if (response.ok) {
Expand All @@ -39,7 +39,7 @@
$selectedLanguage = value;

try {
const response = await fetch(`${base}/api/get_translation`, {
const response = await fetch(`${base}/_api/get_translation`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ locale: value })
Expand Down
File renamed without changes.
23 changes: 0 additions & 23 deletions src/routes/api/auth/+server.ts

This file was deleted.

50 changes: 0 additions & 50 deletions src/routes/api/auth/[flow_id]/+server.ts

This file was deleted.