Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created new Account for Site on initialisation #275

Merged
merged 1 commit into from
Jan 22, 2025
Merged

Conversation

allouis
Copy link
Collaborator

@allouis allouis commented Jan 22, 2025

ref https://linear.app/ghost/issue/AP-658

This is required as going forward actors will be based on Accounts

ref https://linear.app/ghost/issue/AP-658

This is required as going forward actors will be based on Accounts
@@ -15,21 +18,28 @@ describe('SiteService', () => {
await db(TABLE_SITES).truncate();
await db.raw('SET FOREIGN_KEY_CHECKS = 1');

accountService = Object.create(AccountService.prototype);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@@ -65,6 +69,11 @@ export class SiteService {
throw new Error(`Site initialisation failed for ${host}`);
}

const internalAccount = await this.accountService.createInternalAccount(
newSite,
'index',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use ACTOR_DEFAULT_HANDLE from consts maybe?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do this with a cleanup of site service to use consts for tablenames too

@allouis allouis merged commit 144bde6 into main Jan 22, 2025
2 checks passed
@allouis allouis deleted the create-site-account branch January 22, 2025 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants