correction of API routes url
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
export default async function getUser() {
|
export default async function getUser() {
|
||||||
try {
|
try {
|
||||||
const res = await fetch('http://localhost:8000/api/me', {
|
const res = await fetch('http://localhost:80/api/users/me', {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
export default async function getUserNotifications() {
|
export default async function getUserNotifications() {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
'http://localhost:8000/api/users/1/notifications',
|
'http://localhost:80/api/users/1/notifications',
|
||||||
{
|
{
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
export default async function getXSRFToken() {
|
export default async function getXSRFToken() {
|
||||||
const response = await fetch('http://localhost:8000/sanctum/csrf-cookie', {
|
const response = await fetch('http://localhost:80/sanctum/csrf-cookie', {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
credentials: 'include'
|
credentials: 'include'
|
||||||
});
|
});
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ export default async function login(email, password) {
|
|||||||
const csrfToken = await getXSRFToken();
|
const csrfToken = await getXSRFToken();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch('http://localhost:8000/api/users/login', {
|
const response = await fetch('http://localhost:80/api/users/login', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ export default async function register(email, password, name, lastname) {
|
|||||||
const csrfToken = await getXSRFToken();
|
const csrfToken = await getXSRFToken();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch('http://localhost:8000/api/users/register', {
|
const response = await fetch('http://localhost:80/api/users/register', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
Reference in New Issue
Block a user