mirror of
https://github.com/FranP-code/spooky-spotify-showcase.git
synced 2025-10-13 00:02:36 +00:00
Removed console.logs
This commit is contained in:
@@ -13,12 +13,6 @@ export const Charts = ({
|
|||||||
}) => {
|
}) => {
|
||||||
const options = ["Top albums", "Artist popularity"];
|
const options = ["Top albums", "Artist popularity"];
|
||||||
const [selectedOption, setSelectedOption] = useState(options[0]);
|
const [selectedOption, setSelectedOption] = useState(options[0]);
|
||||||
const a = "";
|
|
||||||
console.log({
|
|
||||||
longTermArtistData,
|
|
||||||
longTermTracksData,
|
|
||||||
longTermTracksByAlbum,
|
|
||||||
});
|
|
||||||
const topAlbums = Object.values(longTermTracksByAlbum).sort(
|
const topAlbums = Object.values(longTermTracksByAlbum).sort(
|
||||||
(a, b) => b.tracks.length - a.tracks.length,
|
(a, b) => b.tracks.length - a.tracks.length,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { NextApiRequest, NextApiResponse } from "next";
|
import { type NextApiRequest, type NextApiResponse } from "next";
|
||||||
import SpotifyWebApi from "spotify-web-api-node";
|
import SpotifyWebApi from "spotify-web-api-node";
|
||||||
import { redirect } from "next/navigation";
|
import { redirect } from "next/navigation";
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@ const spotifyApi = new SpotifyWebApi({
|
|||||||
redirectUri: process.env.SPOTIFY_REDIRECT_URI,
|
redirectUri: process.env.SPOTIFY_REDIRECT_URI,
|
||||||
});
|
});
|
||||||
|
|
||||||
const state = process.env.SPOTIFY_STATE as string;
|
const state = process.env.SPOTIFY_STATE!;
|
||||||
|
|
||||||
export async function GET(req: NextApiRequest, res: NextApiResponse) {
|
export async function GET(req: NextApiRequest, res: NextApiResponse) {
|
||||||
const scopes = [
|
const scopes = [
|
||||||
@@ -19,6 +19,5 @@ export async function GET(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
];
|
];
|
||||||
const authorizeURL = spotifyApi.createAuthorizeURL(scopes, state);
|
const authorizeURL = spotifyApi.createAuthorizeURL(scopes, state);
|
||||||
|
|
||||||
console.log(authorizeURL);
|
|
||||||
redirect(authorizeURL);
|
redirect(authorizeURL);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import * as cloudinary from "cloudinary";
|
import * as cloudinary from "cloudinary";
|
||||||
import { Entry } from "../api/routers/entry";
|
import { type Entry } from "../api/routers/entry";
|
||||||
|
|
||||||
export const generateEntryUniqueKey = (entry: Entry): string => {
|
export const generateEntryUniqueKey = (entry: Entry): string => {
|
||||||
return `${entry.type}:${entry.name.trim().toLowerCase().replace(/\s/g, "-")}:${entry.number || 1}`;
|
return `${entry.type}:${entry.name.trim().toLowerCase().replace(/\s/g, "-")}:${entry.number || 1}`;
|
||||||
@@ -16,7 +16,6 @@ export const uploadImage = async (
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const result = await cloudinary.v2.uploader.upload(imagePath, options);
|
const result = await cloudinary.v2.uploader.upload(imagePath, options);
|
||||||
console.log(result);
|
|
||||||
return result.public_id;
|
return result.public_id;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
@@ -37,7 +36,6 @@ export const makeImageSpooky = (publicId: string, number?: number) => {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const result = cloudinary.v2.image(publicId, { ...options });
|
const result = cloudinary.v2.image(publicId, { ...options });
|
||||||
console.log(result);
|
|
||||||
return result;
|
return result;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
|||||||
Reference in New Issue
Block a user