Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ On the frontend, you can set the environment variables in a `.env.local` file or
THUMBNAIL_URL=localhost:9000
NEXT_PUBLIC_RECAPTCHA_SITE_KEY=
NEXT_PUBLIC_URL=http://localhost:3000
NEXT_PUBLIC_API_URL=http://localhost:4000/api/v1
NEXT_PUBLIC_API_URL=http://localhost:4000/v1
```

---
Expand Down Expand Up @@ -152,7 +152,7 @@ You can populate the development database with test data using:

```bash
curl -X 'GET' \
'http://localhost:4000/api/v1/seed/seed-dev' \
'http://localhost:4000/v1/seed/seed-dev' \
-H 'accept: */*'
```

Expand Down
2 changes: 1 addition & 1 deletion apps/backend/src/auth/strategies/discord.strategy/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class DiscordStrategy extends PassportStrategy(strategy, 'discord') {
const config = {
clientID: DISCORD_CLIENT_ID,
clientSecret: DISCORD_CLIENT_SECRET,
callbackUrl: `${SERVER_URL}/api/v1/auth/discord/callback`,
callbackUrl: `${SERVER_URL}/v1/auth/discord/callback`,
scope: [DiscordPermissionScope.Email, DiscordPermissionScope.Identify],
fetchScope: true,
prompt: 'none',
Expand Down
2 changes: 1 addition & 1 deletion apps/backend/src/auth/strategies/github.strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class GithubStrategy extends PassportStrategy(strategy, 'github') {
super({
clientID: GITHUB_CLIENT_ID,
clientSecret: GITHUB_CLIENT_SECRET,
redirect_uri: `${SERVER_URL}/api/v1/auth/github/callback`,
redirect_uri: `${SERVER_URL}/v1/auth/github/callback`,
scope: 'user:read,user:email',
state: false,
});
Expand Down
2 changes: 1 addition & 1 deletion apps/backend/src/auth/strategies/google.strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class GoogleStrategy extends PassportStrategy(Strategy, 'google') {

const SERVER_URL = configService.getOrThrow<string>('SERVER_URL');

const callbackURL = `${SERVER_URL}/api/v1/auth/google/callback`;
const callbackURL = `${SERVER_URL}/v1/auth/google/callback`;
GoogleStrategy.logger.debug(`Google Login callbackURL ${callbackURL}`);

super({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe('MagicLinkEmailStrategy', () => {
const email = '[email protected]';

const magicLink =
'http://localhost/api/v1/auth/magic-link/callback?token=test_token';
'http://localhost/v1/auth/magic-link/callback?token=test_token';

const user = { username: 'testuser', email };

Expand All @@ -80,7 +80,7 @@ describe('MagicLinkEmailStrategy', () => {
to: email,
context: {
magicLink:
'http://localhost/api/v1/auth/magic-link/callback?token=test_token',
'http://localhost/v1/auth/magic-link/callback?token=test_token',
username: 'testuser',
},
subject: 'Noteblock Magic Link',
Expand All @@ -92,7 +92,7 @@ describe('MagicLinkEmailStrategy', () => {
const email = '[email protected]';

const magicLink =
'http://localhost/api/v1/auth/magic-link/callback?token=test_token';
'http://localhost/v1/auth/magic-link/callback?token=test_token';

const user = { username: 'testuser', email };

Expand All @@ -111,7 +111,7 @@ describe('MagicLinkEmailStrategy', () => {
to: email,
context: {
magicLink:
'http://localhost/api/v1/auth/magic-link/callback?token=test_token',
'http://localhost/v1/auth/magic-link/callback?token=test_token',
username: 'testuser',
},
subject: 'Welcome to Noteblock.world',
Expand Down
4 changes: 2 additions & 2 deletions apps/backend/src/auth/strategies/magicLinkEmail.strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export class MagicLinkEmailStrategy extends PassportStrategy(
) {
super({
secret: MAGIC_LINK_SECRET,
confirmUrl: `${SERVER_URL}/api/v1/auth/magic-link/confirm`,
callbackUrl: `${SERVER_URL}/api/v1/auth/magic-link/callback`,
confirmUrl: `${SERVER_URL}/v1/auth/magic-link/confirm`,
callbackUrl: `${SERVER_URL}/v1/auth/magic-link/callback`,
sendMagicLink: MagicLinkEmailStrategy.sendMagicLink(
SERVER_URL,
userService,
Expand Down
4 changes: 2 additions & 2 deletions apps/backend/src/song/song-upload/song-upload.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class SongUploadService {

if (!this.soundsMapping) {
const response = await fetch(
process.env.SERVER_URL + '/api/v1/data/soundList.json',
process.env.SERVER_URL + '/v1/data/soundList.json',
);

this.soundsMapping = (await response.json()) as Record<string, string>;
Expand All @@ -64,7 +64,7 @@ export class SongUploadService {
if (!this.soundsSubset) {
try {
const response = await fetch(
process.env.SERVER_URL + '/api/v1/data/soundList.json',
process.env.SERVER_URL + '/v1/data/soundList.json',
);

const soundMapping = (await response.json()) as Record<string, string>;
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/.env.local.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
THUMBNAIL_URL=
NEXT_PUBLIC_RECAPTCHA_SITE_KEY=
NEXT_PUBLIC_URL=http://localhost:3000
NEXT_PUBLIC_API_URL=http://localhost:4000/api/v1
NEXT_PUBLIC_API_URL=http://localhost:4000/v1
NEXT_PUBLIC_APP_DOMAIN=