mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-09-24 23:01:18 +08:00
fix(api): remove authorization checks (#59680)
This commit is contained in:
@@ -13,9 +13,7 @@ import { getUserById as _getUserById } from '../utils/user-stats';
|
||||
const authRE = /^\/auth\//;
|
||||
const confirmEmailRE = /^\/confirm-email$/;
|
||||
const newsShortLinksRE = /^\/n\/|^\/p\//;
|
||||
const publicApiUserRE = /^\/api\/users\/get-public-profile$/;
|
||||
const publicUserRE = /^\/users\/get-public-profile$/;
|
||||
const publicApiUsernameRE = /^\/api\/users\/exists$/;
|
||||
const publicUsernameRE = /^\/users\/exists$/;
|
||||
const resubscribeRE = /^\/resubscribe\//;
|
||||
const showCertRE = /^\/certificate\/showCert\//;
|
||||
@@ -34,9 +32,7 @@ const _pathsAllowedREs = [
|
||||
authRE,
|
||||
confirmEmailRE,
|
||||
newsShortLinksRE,
|
||||
publicApiUserRE,
|
||||
publicUserRE,
|
||||
publicApiUsernameRE,
|
||||
publicUsernameRE,
|
||||
resubscribeRE,
|
||||
showCertRE,
|
||||
|
||||
@@ -39,9 +39,7 @@ describe('request-authorization', () => {
|
||||
const authRE = /^\/auth\//;
|
||||
const confirmEmailRE = /^\/confirm-email$/;
|
||||
const newsShortLinksRE = /^\/n\/|^\/p\//;
|
||||
const publicApiUserRE = /^\/api\/users\/get-public-profile$/;
|
||||
const publicUserRE = /^\/users\/get-public-profile$/;
|
||||
const publicApiUsernameRE = /^\/api\/users\/exists$/;
|
||||
const publicUsernameRE = /^\/users\/exists$/;
|
||||
const resubscribeRE = /^\/resubscribe\//;
|
||||
const showCertRE = /^\/certificate\/showCert\//;
|
||||
@@ -55,9 +53,7 @@ describe('request-authorization', () => {
|
||||
authRE,
|
||||
confirmEmailRE,
|
||||
newsShortLinksRE,
|
||||
publicApiUserRE,
|
||||
publicUserRE,
|
||||
publicApiUsernameRE,
|
||||
publicUsernameRE,
|
||||
resubscribeRE,
|
||||
showCertRE,
|
||||
|
||||
Reference in New Issue
Block a user