Fixes for UUID errors

This commit is contained in:
Jesse Wierzbinski 2024-04-07 12:03:38 -10:00
parent 61723305e5
commit 02c63c4c6f
No known key found for this signature in database
14 changed files with 15 additions and 15 deletions

View file

@ -13,7 +13,7 @@ export const meta = applyConfig({
max: 30,
duration: 60,
},
route: "/accounts/:id/block",
route: "/api/v1/accounts/:id/block",
auth: {
required: true,
oauthPermissions: ["write:blocks"],

View file

@ -13,7 +13,7 @@ export const meta = applyConfig({
max: 30,
duration: 60,
},
route: "/accounts/:id/follow",
route: "/api/v1/accounts/:id/follow",
auth: {
required: true,
oauthPermissions: ["write:follows"],

View file

@ -11,7 +11,7 @@ export const meta = applyConfig({
max: 60,
duration: 60,
},
route: "/accounts/:id/followers",
route: "/api/v1/accounts/:id/followers",
auth: {
required: false,
oauthPermissions: [],

View file

@ -11,7 +11,7 @@ export const meta = applyConfig({
max: 60,
duration: 60,
},
route: "/accounts/:id/following",
route: "/api/v1/accounts/:id/following",
auth: {
required: false,
oauthPermissions: [],

View file

@ -11,7 +11,7 @@ export const meta = applyConfig({
max: 30,
duration: 60,
},
route: "/accounts/:id",
route: "/api/v1/accounts/:id",
auth: {
required: true,
oauthPermissions: [],
@ -24,7 +24,7 @@ export const meta = applyConfig({
export default apiRoute(async (req, matchedRoute, extraData) => {
const id = matchedRoute.params.id;
// Check if ID is valid UUID
if (!id.match(/^[0-9a-fA-F]{24}$/)) {
if (!id.match(/^[0-9a-fA-F]{36}$/)) {
return errorResponse("Invalid ID", 404);
}

View file

@ -13,7 +13,7 @@ export const meta = applyConfig({
max: 30,
duration: 60,
},
route: "/accounts/:id/mute",
route: "/api/v1/accounts/:id/mute",
auth: {
required: true,
oauthPermissions: ["write:mutes"],

View file

@ -13,7 +13,7 @@ export const meta = applyConfig({
max: 30,
duration: 60,
},
route: "/accounts/:id/note",
route: "/api/v1/accounts/:id/note",
auth: {
required: true,
oauthPermissions: ["write:accounts"],

View file

@ -13,7 +13,7 @@ export const meta = applyConfig({
max: 30,
duration: 60,
},
route: "/accounts/:id/pin",
route: "/api/v1/accounts/:id/pin",
auth: {
required: true,
oauthPermissions: ["write:accounts"],

View file

@ -13,7 +13,7 @@ export const meta = applyConfig({
max: 30,
duration: 60,
},
route: "/accounts/:id/remove_from_followers",
route: "/api/v1/accounts/:id/remove_from_followers",
auth: {
required: true,
oauthPermissions: ["write:follows"],

View file

@ -14,7 +14,7 @@ export const meta = applyConfig({
max: 30,
duration: 60,
},
route: "/accounts/:id/statuses",
route: "/api/v1/accounts/:id/statuses",
auth: {
required: false,
oauthPermissions: ["read:statuses"],

View file

@ -13,7 +13,7 @@ export const meta = applyConfig({
max: 30,
duration: 60,
},
route: "/accounts/:id/unblock",
route: "/api/v1/accounts/:id/unblock",
auth: {
required: true,
oauthPermissions: ["write:blocks"],

View file

@ -13,7 +13,7 @@ export const meta = applyConfig({
max: 30,
duration: 60,
},
route: "/accounts/:id/unfollow",
route: "/api/v1/accounts/:id/unfollow",
auth: {
required: true,
oauthPermissions: ["write:follows"],

View file

@ -13,7 +13,7 @@ export const meta = applyConfig({
max: 30,
duration: 60,
},
route: "/accounts/:id/unmute",
route: "/api/v1/accounts/:id/unmute",
auth: {
required: true,
oauthPermissions: ["write:mutes"],

View file

@ -13,7 +13,7 @@ export const meta = applyConfig({
max: 30,
duration: 60,
},
route: "/accounts/:id/unpin",
route: "/api/v1/accounts/:id/unpin",
auth: {
required: true,
oauthPermissions: ["write:accounts"],