Finalise POST-Move
This commit is contained in:
parent
8ba9380743
commit
3cdcc207b9
|
@ -89,7 +89,7 @@ privacy: "Privatsphäre"
|
||||||
makeFollowManuallyApprove: "Follow-Anfragen benötigen Bestätigung"
|
makeFollowManuallyApprove: "Follow-Anfragen benötigen Bestätigung"
|
||||||
defaultNoteVisibility: "Standardsichtbarkeit"
|
defaultNoteVisibility: "Standardsichtbarkeit"
|
||||||
follow: "Folgen"
|
follow: "Folgen"
|
||||||
followRequest: "Follow-Anfrage senden"
|
followRequest: "Follow anfragen"
|
||||||
followRequests: "Follow-Anfragen"
|
followRequests: "Follow-Anfragen"
|
||||||
unfollow: "Nicht mehr folgen"
|
unfollow: "Nicht mehr folgen"
|
||||||
followRequestPending: "Follow-Anfrage ausstehend"
|
followRequestPending: "Follow-Anfrage ausstehend"
|
||||||
|
|
|
@ -89,7 +89,7 @@ privacy: "Privacy"
|
||||||
makeFollowManuallyApprove: "Follow requests require approval"
|
makeFollowManuallyApprove: "Follow requests require approval"
|
||||||
defaultNoteVisibility: "Default visibility"
|
defaultNoteVisibility: "Default visibility"
|
||||||
follow: "Follow"
|
follow: "Follow"
|
||||||
followRequest: "Send follow request"
|
followRequest: "Request follow"
|
||||||
followRequests: "Follow requests"
|
followRequests: "Follow requests"
|
||||||
unfollow: "Unfollow"
|
unfollow: "Unfollow"
|
||||||
followRequestPending: "Follow request pending"
|
followRequestPending: "Follow request pending"
|
||||||
|
|
|
@ -62,6 +62,7 @@ export const paramDef = {
|
||||||
|
|
||||||
// eslint-disable-next-line import/no-default-export
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, paramDef, async (ps, user) => {
|
export default define(meta, paramDef, async (ps, user) => {
|
||||||
|
if(user.movedToUri != null) throw new ApiError(meta.errors.noSuchUserGroup);
|
||||||
let userList;
|
let userList;
|
||||||
let userGroupJoining;
|
let userGroupJoining;
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,10 @@ export const paramDef = {
|
||||||
|
|
||||||
// eslint-disable-next-line import/no-default-export
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, paramDef, async (ps, user) => {
|
export default define(meta, paramDef, async (ps, user) => {
|
||||||
|
if(user && user.movedToUri != null) return await Apps.pack("", null, {
|
||||||
|
detail: true,
|
||||||
|
includeSecret: true,
|
||||||
|
});;
|
||||||
// Generate secret
|
// Generate secret
|
||||||
const secret = secureRndstr(32, true);
|
const secret = secureRndstr(32, true);
|
||||||
|
|
||||||
|
|
|
@ -169,7 +169,7 @@ export const paramDef = {
|
||||||
|
|
||||||
// eslint-disable-next-line import/no-default-export
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, paramDef, async (ps, user) => {
|
export default define(meta, paramDef, async (ps, user) => {
|
||||||
if(user.movedToUri) throw new ApiError(meta.errors.accountLocked);
|
if(user.movedToUri != null) throw new ApiError(meta.errors.accountLocked);
|
||||||
let visibleUsers: User[] = [];
|
let visibleUsers: User[] = [];
|
||||||
if (ps.visibleUserIds) {
|
if (ps.visibleUserIds) {
|
||||||
visibleUsers = await Users.findBy({
|
visibleUsers = await Users.findBy({
|
||||||
|
|
|
@ -28,6 +28,11 @@ export const meta = {
|
||||||
code: 'YOU_HAVE_BEEN_BLOCKED',
|
code: 'YOU_HAVE_BEEN_BLOCKED',
|
||||||
id: '20ef5475-9f38-4e4c-bd33-de6d979498ec',
|
id: '20ef5475-9f38-4e4c-bd33-de6d979498ec',
|
||||||
},
|
},
|
||||||
|
accountLocked: {
|
||||||
|
message: 'You migrated. Your account is now locked.',
|
||||||
|
code: 'ACCOUNT_LOCKED',
|
||||||
|
id: 'd390d7e1-8a5e-46ed-b625-06271cafd3d3',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
|
@ -42,6 +47,7 @@ export const paramDef = {
|
||||||
|
|
||||||
// eslint-disable-next-line import/no-default-export
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, paramDef, async (ps, user) => {
|
export default define(meta, paramDef, async (ps, user) => {
|
||||||
|
if(user.movedToUri != null) throw new ApiError(meta.errors.accountLocked);
|
||||||
const note = await getNote(ps.noteId, user).catch(err => {
|
const note = await getNote(ps.noteId, user).catch(err => {
|
||||||
if (err.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote);
|
if (err.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote);
|
||||||
throw err;
|
throw err;
|
||||||
|
|
Loading…
Reference in New Issue