mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Require single quotes
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { callPopup, getRequestHeaders } from "../script.js";
|
||||
import { callPopup, getRequestHeaders } from '../script.js';
|
||||
|
||||
export const SECRET_KEYS = {
|
||||
HORDE: 'api_key_horde',
|
||||
@ -143,7 +143,7 @@ async function checkOpenRouterAuth() {
|
||||
if (params.has('code')) {
|
||||
const code = params.get('code');
|
||||
try {
|
||||
const response = await fetch("https://openrouter.ai/api/v1/auth/keys", {
|
||||
const response = await fetch('https://openrouter.ai/api/v1/auth/keys', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ code }),
|
||||
});
|
||||
@ -163,8 +163,8 @@ async function checkOpenRouterAuth() {
|
||||
toastr.success('OpenRouter token saved');
|
||||
// Remove the code from the URL
|
||||
const currentUrl = window.location.href;
|
||||
const urlWithoutSearchParams = currentUrl.split("?")[0];
|
||||
window.history.pushState({}, "", urlWithoutSearchParams);
|
||||
const urlWithoutSearchParams = currentUrl.split('?')[0];
|
||||
window.history.pushState({}, '', urlWithoutSearchParams);
|
||||
} else {
|
||||
throw new Error('OpenRouter token not saved');
|
||||
}
|
||||
|
Reference in New Issue
Block a user