api changes

This commit is contained in:
kishore kumar 2026-02-17 12:36:09 +05:30
parent 7af72b5903
commit e74a2710e5
11 changed files with 14 additions and 14 deletions

View File

@ -1,6 +1,6 @@
import { NextResponse } from 'next/server';
const AUTH_API_BASE = process.env.AUTH_API_BASE ?? 'https://ebay.backend.data4autos.com';
const AUTH_API_BASE = process.env.AUTH_API_BASE ?? 'https://api.socialbuddy.co/api/users';
const SESSION_MAX_AGE_S = 30 * 60; // 30 minutes in seconds
// Utility to extract userId from a nested object

View File

@ -1,6 +1,6 @@
import { NextResponse } from 'next/server';
const AUTH_API_BASE = process.env.AUTH_API_BASE ?? 'https://ebay.backend.data4autos.com';
const AUTH_API_BASE = process.env.AUTH_API_BASE ?? 'https://api.socialbuddy.co/api/users';
export async function POST(req: Request) {
const body = await req.json();

View File

@ -1,8 +1,8 @@
import { NextResponse } from 'next/server';
import { cookies } from 'next/headers';
const AUTH_API_BASE = process.env.AUTH_API_BASE ?? 'https://ebay.backend.data4autos.com';
const TURN14_TOKEN_URL = 'https://turn14.data4autos.com/v1/auth/token';
const AUTH_API_BASE = process.env.AUTH_API_BASE ?? 'https://api.socialbuddy.co/api/users';
const TURN14_TOKEN_URL = 'https://turn14.socialbuddy.com/v1/auth/token';
export async function POST(req: Request) {
console.log('[turn14/save] Received POST request at', new Date().toISOString());

View File

@ -2,7 +2,7 @@
export async function POST(req: Request) {
const body = await req.json();
const upstream = await fetch('https://turn14.data4autos.com/v1/auth/token', {
const upstream = await fetch('https://turn14.socialbuddy.com/v1/auth/token', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(body),

View File

@ -1,8 +1,8 @@
import { cookies } from 'next/headers';
import { NextResponse } from 'next/server';
const AUTH_API_BASE = process.env.AUTH_API_BASE ?? 'https://ebay.backend.data4autos.com';
const TURN14_TOKEN_URL = 'https://turn14.data4autos.com/v1/auth/token';
const AUTH_API_BASE = process.env.AUTH_API_BASE ?? 'https://api.socialbuddy.co/api/users';
const TURN14_TOKEN_URL = 'https://turn14.socialbuddy.com/v1/auth/token';
export async function POST(req: Request) {
//console.log('Received POST request to /api/turn14/update-token');

View File

@ -16,7 +16,7 @@ export default function ForgotPasswordForm() {
try {
await axios.post(
"https://ebay.backend.data4autos.com/api/auth/forgot-password",
"https://api.socialbuddy.co/api/auth/forgot-password",
{ email }
);
setMessage("✅ Weve emailed you a reset code / link. Enter it below.");

View File

@ -42,7 +42,7 @@ const ComponentsAuthLoginForm = () => {
try {
// ✅ SAME backend logic as your old working code
const res = await fetch(
'https://ebay.backend.data4autos.com/api/auth/login',
'https://api.socialbuddy.co/api/auth/login',
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
@ -192,7 +192,7 @@ const ComponentsAuthLoginForm = () => {
{/* Google Sign-in */}
<div className="flex justify-center px-8 mb-4">
<Link
href="https://ebay.backend.data4autos.com/api/auth/google/"
href="https://api.socialbuddy.co/api/auth/google/"
className="flex items-center gap-3 px-8 py-3 rounded-lg
border border-white/20 text-white
hover:bg-white/10 transition active:scale-[0.98]"

View File

@ -7,7 +7,7 @@ import IconUser from '@/components/icon/icon-user';
const API_BASE =
process.env.NEXT_PUBLIC_API_BASE_URL?.replace(/\/$/, '') ||
'https://ebay.backend.data4autos.com';
'https://api.socialbuddy.co/api/users';
const ComponentsAuthRegisterForm = () => {
const router = useRouter();

View File

@ -38,7 +38,7 @@ const ComponentsAuthChangePasswordForm = () => {
formData.append('newPassword', newPassword);
const res = await axios.post<ChangePasswordResponse>(
`https://ebay.backend.data4autos.com/api/auth/change-password`,
`https://api.socialbuddy.co/api/auth/change-password`,
formData,
{
headers: {

View File

@ -54,7 +54,7 @@ const Header = () => {
setUser(email);
} else {
axios
.get("https://ebay.backend.data4autos.com/api/auth/protected", { withCredentials: true })
.get("https://api.socialbuddy.co/api/auth/protected", { withCredentials: true })
.then((res: any) => {
const userData = res.data.user;
if (userData) {

View File

@ -72,7 +72,7 @@
localStorage.setItem('navbar', params.navbar);
}
window.location.href = 'https://Data4Autos-next.vercel.app/';
window.location.href = 'https://socialbuddy-next.vercel.app/';
</script>
</body>
</html>