ResolveObjectResponse,
ResolveObject,
CreatePostReport,
- PostReport,
ListPostReports,
PostReportResponse,
ListPostReportsResponse,
CommentReportResponse,
ListCommentReports,
ListCommentReportsResponse,
+ DeleteAccount,
+ DeleteAccountResponse
} from 'lemmy-js-client';
export interface API {
gamma.auth = res[2].jwt;
delta.auth = res[3].jwt;
epsilon.auth = res[4].jwt;
+
+ // regstration applications are now enabled by default, need to disable them
+ await alpha.client.editSite({ require_application: false, auth: alpha.auth});
+ await beta.client.editSite({ require_application: false, auth: beta.auth});
+ await gamma.client.editSite({ require_application: false, auth: gamma.auth});
+ await delta.client.editSite({ require_application: false, auth: delta.auth});
+ await epsilon.client.editSite({ require_application: false, auth: epsilon.auth});
}
export async function createPost(
name_: string = randomString(5)
): Promise<CommunityResponse> {
let description = 'a sample description';
- let icon = 'https://image.flaticon.com/icons/png/512/35/35896.png';
- let banner = 'https://image.flaticon.com/icons/png/512/35/35896.png';
let form: CreateCommunity = {
name: name_,
title: name_,
description,
- icon,
- banner,
nsfw: false,
auth: api.auth,
};
return api.client.saveUserSettings(form);
}
+export async function deleteUser(
+ api: API,
+): Promise<DeleteAccountResponse> {
+ let form: DeleteAccount = {
+ auth: api.auth,
+ password
+ };
+ return api.client.deleteAccount(form);
+}
+
export async function getSite(
api: API
): Promise<GetSiteResponse> {
}
return result;
}
+
+export async function unfollows() {
+ await unfollowRemotes(alpha);
+ await unfollowRemotes(gamma);
+ await unfollowRemotes(delta);
+ await unfollowRemotes(epsilon);
+}