mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
Fixes for UUID errors
This commit is contained in:
parent
61723305e5
commit
02c63c4c6f
|
|
@ -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"],
|
||||
|
|
|
|||
|
|
@ -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"],
|
||||
|
|
|
|||
|
|
@ -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: [],
|
||||
|
|
|
|||
|
|
@ -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: [],
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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"],
|
||||
|
|
|
|||
|
|
@ -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"],
|
||||
|
|
|
|||
|
|
@ -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"],
|
||||
|
|
|
|||
|
|
@ -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"],
|
||||
|
|
|
|||
|
|
@ -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"],
|
||||
|
|
|
|||
|
|
@ -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"],
|
||||
|
|
|
|||
|
|
@ -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"],
|
||||
|
|
|
|||
|
|
@ -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"],
|
||||
|
|
|
|||
|
|
@ -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"],
|
||||
|
|
|
|||
Loading…
Reference in a new issue