mirror of
				https://github.com/D4M13N-D3V/comissions-app-ui.git
				synced 2025-10-31 01:25:22 +00:00 
			
		
		
		
	chore: cleaned up the naming of components, apis, and pgaes.
This commit is contained in:
		
							parent
							
								
									5a2f43768d
								
							
						
					
					
						commit
						8569290c0e
					
				| @ -9,7 +9,7 @@ import { useEffect, useState } from "react"; | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| export default function ArtistRequest({id,userid,username,message,date,reload}) { | export default function AdminArtistRequest({id,userid,username,message,date,reload}) { | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|   useEffect(() => { |   useEffect(() => { | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | ||||||
| 
 | 
 | ||||||
| export default withApiAuthRequired(async function onboardUrl(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|   const { accessToken } = await getAccessToken(req, res); |   const { accessToken } = await getAccessToken(req, res); | ||||||
|   const { offset, pageSize } = req.body; |   const { offset, pageSize } = req.body; | ||||||
|   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminArtists?offset='+offset+'&pageSize='+pageSize, { |   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminArtists?offset='+offset+'&pageSize='+pageSize, { | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | ||||||
| 
 | 
 | ||||||
| export default withApiAuthRequired(async function onboardUrl(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|   const { accessToken } = await getAccessToken(req, res); |   const { accessToken } = await getAccessToken(req, res); | ||||||
|   const { artistId } = req.query; |   const { artistId } = req.query; | ||||||
|   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminArtists/'+userId, { |   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminArtists/'+userId, { | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | ||||||
| 
 | 
 | ||||||
| export default withApiAuthRequired(async function onboardUrl(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|   const { accessToken } = await getAccessToken(req, res); |   const { accessToken } = await getAccessToken(req, res); | ||||||
|   const { userId } = req.query; |   const { userId } = req.query; | ||||||
|   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminArtists/'+userId+"/Suspend", { |   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminArtists/'+userId+"/Suspend", { | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | ||||||
| 
 | 
 | ||||||
| export default withApiAuthRequired(async function onboardUrl(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|   const { accessToken } = await getAccessToken(req, res); |   const { accessToken } = await getAccessToken(req, res); | ||||||
|   const { userId } = req.query; |   const { userId } = req.query; | ||||||
|   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminArtists/'+userId+"/Terminate", { |   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminArtists/'+userId+"/Terminate", { | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | ||||||
| 
 | 
 | ||||||
| export default withApiAuthRequired(async function onboardUrl(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|   const { accessToken } = await getAccessToken(req, res); |   const { accessToken } = await getAccessToken(req, res); | ||||||
|   const { userId } = req.query; |   const { userId } = req.query; | ||||||
|   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminArtists/'+userId+"/Unsuspend", { |   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminArtists/'+userId+"/Unsuspend", { | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | ||||||
| 
 | 
 | ||||||
| export default withApiAuthRequired(async function onboardUrl(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|   const { accessToken } = await getAccessToken(req, res); |   const { accessToken } = await getAccessToken(req, res); | ||||||
|   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminArtists/Count', { |   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminArtists/Count', { | ||||||
|     headers: { |     headers: { | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | ||||||
| 
 | 
 | ||||||
| export default withApiAuthRequired(async function onboardUrl(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|   const { accessToken } = await getAccessToken(req, res); |   const { accessToken } = await getAccessToken(req, res); | ||||||
|   const { offset, pageSize } = req.body; |   const { offset, pageSize } = req.body; | ||||||
|   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminArtistRequests?offset='+offset+'&pageSize='+pageSize, { |   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminArtistRequests?offset='+offset+'&pageSize='+pageSize, { | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | ||||||
| 
 | 
 | ||||||
| export default withApiAuthRequired(async function onboardUrl(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|   const { accessToken } = await getAccessToken(req, res); |   const { accessToken } = await getAccessToken(req, res); | ||||||
|   const { requestId } = req.query; |   const { requestId } = req.query; | ||||||
|   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminArtistRequests/'+requestId, { |   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminArtistRequests/'+requestId, { | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | ||||||
| 
 | 
 | ||||||
| export default withApiAuthRequired(async function onboardUrl(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|   const { accessToken } = await getAccessToken(req, res); |   const { accessToken } = await getAccessToken(req, res); | ||||||
|   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminArtistRequests/Count', { |   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminArtistRequests/Count', { | ||||||
|     headers: { |     headers: { | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | ||||||
| 
 | 
 | ||||||
| export default withApiAuthRequired(async function onboardUrl(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|   const { accessToken } = await getAccessToken(req, res); |   const { accessToken } = await getAccessToken(req, res); | ||||||
|   const { offset, pageSize } = req.body; |   const { offset, pageSize } = req.body; | ||||||
|   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminUsers?offset='+offset+'&pageSize='+pageSize, { |   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminUsers?offset='+offset+'&pageSize='+pageSize, { | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | ||||||
| 
 | 
 | ||||||
| export default withApiAuthRequired(async function onboardUrl(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|   const { accessToken } = await getAccessToken(req, res); |   const { accessToken } = await getAccessToken(req, res); | ||||||
|   const { userId } = req.query; |   const { userId } = req.query; | ||||||
|   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminUsers/'+userId, { |   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminUsers/'+userId, { | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | ||||||
| 
 | 
 | ||||||
| export default withApiAuthRequired(async function onboardUrl(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|   const { accessToken } = await getAccessToken(req, res); |   const { accessToken } = await getAccessToken(req, res); | ||||||
|   const { userId } = req.query; |   const { userId } = req.query; | ||||||
|   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminUsers/'+userId+"/Ban", { |   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminUsers/'+userId+"/Ban", { | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | ||||||
| 
 | 
 | ||||||
| export default withApiAuthRequired(async function onboardUrl(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|   const { accessToken } = await getAccessToken(req, res); |   const { accessToken } = await getAccessToken(req, res); | ||||||
|   const { userId } = req.query; |   const { userId } = req.query; | ||||||
|   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminUsers/'+userId+"/Suspend", { |   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminUsers/'+userId+"/Suspend", { | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | ||||||
| 
 | 
 | ||||||
| export default withApiAuthRequired(async function onboardUrl(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|   const { accessToken } = await getAccessToken(req, res); |   const { accessToken } = await getAccessToken(req, res); | ||||||
|   const { userId } = req.query; |   const { userId } = req.query; | ||||||
|   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminUsers/'+userId+"/Unban", { |   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminUsers/'+userId+"/Unban", { | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | ||||||
| 
 | 
 | ||||||
| export default withApiAuthRequired(async function onboardUrl(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|   const { accessToken } = await getAccessToken(req, res); |   const { accessToken } = await getAccessToken(req, res); | ||||||
|   const { userId } = req.query; |   const { userId } = req.query; | ||||||
|   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminUsers/'+userId+"/Unsuspend", { |   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminUsers/'+userId+"/Unsuspend", { | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | ||||||
| 
 | 
 | ||||||
| export default withApiAuthRequired(async function onboardUrl(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|   const { accessToken } = await getAccessToken(req, res); |   const { accessToken } = await getAccessToken(req, res); | ||||||
|   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminUsers/Count', { |   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/admin/AdminUsers/Count', { | ||||||
|     headers: { |     headers: { | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | ||||||
| 
 | 
 | ||||||
| export default withApiAuthRequired(async function products(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|   const { accessToken } = await getAccessToken(req, res); |   const { accessToken } = await getAccessToken(req, res); | ||||||
|   const requestId = req.query.requestId; |   const requestId = req.query.requestId; | ||||||
|   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/Requests/Artist/'+requestId+'/Accept', { |   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/Requests/Artist/'+requestId+'/Accept', { | ||||||
|  | |||||||
| @ -6,7 +6,7 @@ async function createBlobFromFile(path: string): Promise<Blob> { | |||||||
|   const file = await fs.readFile(path); |   const file = await fs.readFile(path); | ||||||
|   return new Blob([file]); |   return new Blob([file]); | ||||||
| } | } | ||||||
| export default withApiAuthRequired(async function products(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|   const { accessToken } = await getAccessToken(req, res); |   const { accessToken } = await getAccessToken(req, res); | ||||||
|   const requestId = req.query.requestId; |   const requestId = req.query.requestId; | ||||||
|     const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/Requests/Artist/'+requestId+'/Assets', { |     const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/Requests/Artist/'+requestId+'/Assets', { | ||||||
|  | |||||||
| @ -3,7 +3,7 @@ import axios from 'axios'; | |||||||
| import fs from 'fs'; | import fs from 'fs'; | ||||||
| import path from 'path'; | import path from 'path'; | ||||||
| 
 | 
 | ||||||
| export default withApiAuthRequired(async function references(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|     const { accessToken } = await getAccessToken(req, res); |     const { accessToken } = await getAccessToken(req, res); | ||||||
|     const requestId = req.query.requestId; |     const requestId = req.query.requestId; | ||||||
|     const assetId = req.query.assetId; |     const assetId = req.query.assetId; | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | ||||||
| 
 | 
 | ||||||
| export default withApiAuthRequired(async function products(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|   const { accessToken } = await getAccessToken(req, res); |   const { accessToken } = await getAccessToken(req, res); | ||||||
|   const requestId = req.query.requestId; |   const requestId = req.query.requestId; | ||||||
|   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/Requests/Artist/'+requestId+'/Complete', { |   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/Requests/Artist/'+requestId+'/Complete', { | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | ||||||
| 
 | 
 | ||||||
| export default withApiAuthRequired(async function products(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|   const { accessToken } = await getAccessToken(req, res); |   const { accessToken } = await getAccessToken(req, res); | ||||||
|   const requestId = req.query.requestId; |   const requestId = req.query.requestId; | ||||||
|   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/Requests/Artist/'+requestId+'/Deny', { |   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/Requests/Artist/'+requestId+'/Deny', { | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | ||||||
| 
 | 
 | ||||||
| export default withApiAuthRequired(async function requestDetails(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|   const { accessToken } = await getAccessToken(req, res); |   const { accessToken } = await getAccessToken(req, res); | ||||||
|   const requestId = req.query.requestId; |   const requestId = req.query.requestId; | ||||||
|   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/Requests/Artist/'+requestId, { |   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/Requests/Artist/'+requestId, { | ||||||
|  | |||||||
| @ -3,7 +3,7 @@ import axios from 'axios'; | |||||||
| import fs from 'fs'; | import fs from 'fs'; | ||||||
| import path from 'path'; | import path from 'path'; | ||||||
| 
 | 
 | ||||||
| export default withApiAuthRequired(async function references(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|     const { accessToken } = await getAccessToken(req, res); |     const { accessToken } = await getAccessToken(req, res); | ||||||
|     const requestId = req.query.requestId; |     const requestId = req.query.requestId; | ||||||
|     const referenceId = req.query.referenceId; |     const referenceId = req.query.referenceId; | ||||||
|  | |||||||
| @ -3,7 +3,7 @@ import { withApiAuthRequired } from "@auth0/nextjs-auth0"; | |||||||
| import { getAccessToken } from '@auth0/nextjs-auth0'; | import { getAccessToken } from '@auth0/nextjs-auth0'; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| export default withApiAuthRequired(async function me(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|     if(req.method !== 'GET') { |     if(req.method !== 'GET') { | ||||||
|         ////console.log(req.body)
 |         ////console.log(req.body)
 | ||||||
|         const { accessToken } = await getAccessToken(req, res); |         const { accessToken } = await getAccessToken(req, res); | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | ||||||
| 
 | 
 | ||||||
| export default withApiAuthRequired(async function onboardUrl(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|   const { accessToken } = await getAccessToken(req, res); |   const { accessToken } = await getAccessToken(req, res); | ||||||
|   const { completed, declined, accepted, paid, offset, pageSize } = req.body; |   const { completed, declined, accepted, paid, offset, pageSize } = req.body; | ||||||
|   const apiUrl = `${process.env.NEXT_PUBLIC_API_URL}/api/Requests/Customer/Count?completed=${completed}&declined=${declined}&accepted=${accepted}&paid=${paid}&offset=${offset}&pageSize=${pageSize}`; |   const apiUrl = `${process.env.NEXT_PUBLIC_API_URL}/api/Requests/Customer/Count?completed=${completed}&declined=${declined}&accepted=${accepted}&paid=${paid}&offset=${offset}&pageSize=${pageSize}`; | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | ||||||
| 
 | 
 | ||||||
| export default withApiAuthRequired(async function onboardUrl(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|   const { accessToken } = await getAccessToken(req, res); |   const { accessToken } = await getAccessToken(req, res); | ||||||
|   const { completed, declined, accepted, paid, offset, pageSize } = req.body; |   const { completed, declined, accepted, paid, offset, pageSize } = req.body; | ||||||
|   const apiUrl = `${process.env.NEXT_PUBLIC_API_URL}/api/Requests/Customer?completed=${completed}&declined=${declined}&accepted=${accepted}&paid=${paid}&offset=${offset}&pageSize=${pageSize}`; |   const apiUrl = `${process.env.NEXT_PUBLIC_API_URL}/api/Requests/Customer?completed=${completed}&declined=${declined}&accepted=${accepted}&paid=${paid}&offset=${offset}&pageSize=${pageSize}`; | ||||||
|  | |||||||
| @ -6,7 +6,7 @@ async function createBlobFromFile(path: string): Promise<Blob> { | |||||||
|   const file = await fs.readFile(path); |   const file = await fs.readFile(path); | ||||||
|   return new Blob([file]); |   return new Blob([file]); | ||||||
| } | } | ||||||
| export default withApiAuthRequired(async function products(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|   const { accessToken } = await getAccessToken(req, res); |   const { accessToken } = await getAccessToken(req, res); | ||||||
|   const requestId = req.query.requestId; |   const requestId = req.query.requestId; | ||||||
|     const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/Requests/Customer/'+requestId+'/Assets', { |     const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/Requests/Customer/'+requestId+'/Assets', { | ||||||
|  | |||||||
| @ -3,7 +3,7 @@ import axios from 'axios'; | |||||||
| import fs from 'fs'; | import fs from 'fs'; | ||||||
| import path from 'path'; | import path from 'path'; | ||||||
| 
 | 
 | ||||||
| export default withApiAuthRequired(async function references(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|     const { accessToken } = await getAccessToken(req, res); |     const { accessToken } = await getAccessToken(req, res); | ||||||
|     const requestId = req.query.requestId; |     const requestId = req.query.requestId; | ||||||
|     const assetId = req.query.assetId; |     const assetId = req.query.assetId; | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | ||||||
| 
 | 
 | ||||||
| export default withApiAuthRequired(async function requestDetails(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|   const { accessToken } = await getAccessToken(req, res); |   const { accessToken } = await getAccessToken(req, res); | ||||||
|   const requestId = req.query.requestId; |   const requestId = req.query.requestId; | ||||||
|   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/Requests/Customer/'+requestId, { |   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/Requests/Customer/'+requestId, { | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | ||||||
| 
 | 
 | ||||||
| export default withApiAuthRequired(async function products(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|   const { accessToken } = await getAccessToken(req, res); |   const { accessToken } = await getAccessToken(req, res); | ||||||
|   const requestId = req.query.requestId; |   const requestId = req.query.requestId; | ||||||
|   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/Requests/Customer/'+requestId+'/Payment', { |   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/Requests/Customer/'+requestId+'/Payment', { | ||||||
|  | |||||||
| @ -6,7 +6,7 @@ async function createBlobFromFile(path: string): Promise<Blob> { | |||||||
|   const file = await fs.readFile(path); |   const file = await fs.readFile(path); | ||||||
|   return new Blob([file]); |   return new Blob([file]); | ||||||
| } | } | ||||||
| export default withApiAuthRequired(async function products(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|   const { accessToken } = await getAccessToken(req, res); |   const { accessToken } = await getAccessToken(req, res); | ||||||
|   const requestId = req.query.requestId; |   const requestId = req.query.requestId; | ||||||
|     const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/Requests/Customer/'+requestId+'/References', { |     const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/Requests/Customer/'+requestId+'/References', { | ||||||
|  | |||||||
| @ -3,7 +3,7 @@ import axios from 'axios'; | |||||||
| import fs from 'fs'; | import fs from 'fs'; | ||||||
| import path from 'path'; | import path from 'path'; | ||||||
| 
 | 
 | ||||||
| export default withApiAuthRequired(async function references(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|     const { accessToken } = await getAccessToken(req, res); |     const { accessToken } = await getAccessToken(req, res); | ||||||
|     const requestId = req.query.requestId; |     const requestId = req.query.requestId; | ||||||
|     const referenceId = req.query.referenceId; |     const referenceId = req.query.referenceId; | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | import { getAccessToken, withApiAuthRequired, getSession } from '@auth0/nextjs-auth0'; | ||||||
| 
 | 
 | ||||||
| export default withApiAuthRequired(async function products(req, res) { | export default withApiAuthRequired(async function handler(req, res) { | ||||||
|   const { accessToken } = await getAccessToken(req, res); |   const { accessToken } = await getAccessToken(req, res); | ||||||
|   const requestId = req.query.requestId; |   const requestId = req.query.requestId; | ||||||
|   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/Requests/Customer/'+requestId+'/Review', { |   const response = await fetch(process.env.NEXT_PUBLIC_API_URL+'/api/Requests/Customer/'+requestId+'/Review', { | ||||||
|  | |||||||
| @ -23,7 +23,7 @@ import { profile } from "console"; | |||||||
| import FileOpen from "@mui/icons-material/FileOpen"; | import FileOpen from "@mui/icons-material/FileOpen"; | ||||||
| import Reviews from "../../components/dashboard/artist/reviews"; | import Reviews from "../../components/dashboard/artist/reviews"; | ||||||
| 
 | 
 | ||||||
| const Profile = () => { | const ArtistBox = () => { | ||||||
| 
 | 
 | ||||||
|     const [profileData, setArtistData] = useState(null); |     const [profileData, setArtistData] = useState(null); | ||||||
|     const [description, setDescription] = useState(""); |     const [description, setDescription] = useState(""); | ||||||
| @ -252,6 +252,6 @@ const Profile = () => { | |||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| // Protected route, checking user authentication client-side.(CSR)
 | // Protected route, checking user authentication client-side.(CSR)
 | ||||||
| export default withPageAuthRequired(Profile); | export default withPageAuthRequired(ArtistBox); | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -293,11 +293,12 @@ const ArtistRequestDetails = () => { | |||||||
|   ) |   ) | ||||||
|   :( |   :( | ||||||
|     <> |     <> | ||||||
|  |       <Box sx={{paddingTop:"20%", textAlign:"center"}}> | ||||||
|         <Typography variant="h6" component="h6" gutterBottom> |         <Typography variant="h6" component="h6" gutterBottom> | ||||||
|             Loading... |             Loading... | ||||||
|         </Typography> |         </Typography> | ||||||
|         <Box sx={{paddingTop:"20%"}}></Box> |  | ||||||
|         <CircularProgress/> |         <CircularProgress/> | ||||||
|  |       </Box> | ||||||
|     </> |     </> | ||||||
|   )} |   )} | ||||||
| </> | </> | ||||||
|  | |||||||
| @ -309,11 +309,12 @@ const RequestDetails = () => { | |||||||
|   ) |   ) | ||||||
|   :( |   :( | ||||||
|     <> |     <> | ||||||
|  |     <Box sx={{paddingTop:"20%", textAlign:"center"}}> | ||||||
|       <Typography variant="h6" component="h6" gutterBottom> |       <Typography variant="h6" component="h6" gutterBottom> | ||||||
|           Loading... |           Loading... | ||||||
|       </Typography> |       </Typography> | ||||||
|         <Box sx={{paddingTop:"20%"}}></Box> |  | ||||||
|       <CircularProgress/> |       <CircularProgress/> | ||||||
|  |     </Box> | ||||||
|     </> |     </> | ||||||
|   )} |   )} | ||||||
| </> | </> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Damien Ostler
						Damien Ostler