Skip to content

Commit

Permalink
CHG base url
Browse files Browse the repository at this point in the history
  • Loading branch information
synoet authored and GusSand committed Mar 23, 2024
1 parent 5aecf69 commit ae71085
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions extension/src/completion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export async function getCompletion(
): Promise<Completion | null> {
const response = await axios
.post(
"https://pincer-server.fly.dev/completion",
`${process.env.BASE_URL}/completion`,
{
prompt: input,
context: context ?? "",
Expand Down Expand Up @@ -45,7 +45,7 @@ export async function syncCompletion(
user: User
): Promise<void> {
axios
.post("https://pincer-server.fly.dev/sync/completion", {
.post(`${process.env.BASE_URL}/sync/completion`, {
completion: completion,
user: user,
})
Expand Down
6 changes: 3 additions & 3 deletions extension/src/logging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import axios from "axios";
export class Logger {
info(message: string) {
axios.post(
"https://pincer-server.fly.dev/log",
`${process.env.BASE_URL}/log`,
{
data: message,
level: "info",
Expand All @@ -13,7 +13,7 @@ export class Logger {
}
warn(message: string) {
axios.post(
"https://pincer-server.fly.dev/log",
`${process.env.BASE_URL}/log`,
{
data: message,
level: "warn",
Expand All @@ -23,7 +23,7 @@ export class Logger {
}
error(message: string) {
axios.post(
"https://pincer-server.fly.dev/log",
`${process.env.BASE_URL}/log`,
{
data: message,
level: "error",
Expand Down
2 changes: 1 addition & 1 deletion extension/src/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class ExtensionState implements ExtensionState {
async sync() {
return axios
.post(
"https://pincer-server.fly.dev/sync/documents",
`${process.env.BASE_URL}/sync/documents`,
{
documents: this.unsavedChanges,
user: this.user,
Expand Down
4 changes: 2 additions & 2 deletions extension/src/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function getOrCreateUser(): Promise<User> {

export async function initializeUser(id: string, netId: string): Promise<void> {
await axios.post(
"https://pincer-server.fly.dev/user",
`${process.env.BASE_URL}/user`,
{ id: id, netId: netId },
{ headers: { "auth-key": process.env.AUTH_KEY } }
);
Expand All @@ -44,7 +44,7 @@ export async function getUserSettings(
id: string
): Promise<UserSettings | null> {
return axios
.get(`https://pincer-server.fly.dev/settings/${id}`, {
.get(`${process.env.BASE_URL}/settings/${id}`, {
headers: { "auth-key": process.env.AUTH_KEY },
})
.then((response) => {
Expand Down
2 changes: 1 addition & 1 deletion server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import express, {
import bodyParser from "body-parser";
import { createClient } from "@supabase/supabase-js";
import { Completion, User, DocumentChange } from "shared";
import { CompletionSource, CompletionType, DEFAULT_CONFIGURATION } from "./types";
import { CompletionType, DEFAULT_CONFIGURATION } from "./types";
import { constructChatCompletionRequest, constructTextCompletionRequest } from "./completion";
import * as dotenv from "dotenv";

Expand Down

0 comments on commit ae71085

Please sign in to comment.