Skip to content

pages API#1986

Open
GunkaArtur wants to merge 1 commit into
developfrom
25687-pagesAPI
Open

pages API#1986
GunkaArtur wants to merge 1 commit into
developfrom
25687-pagesAPI

Conversation

@GunkaArtur
Copy link
Copy Markdown
Contributor

@GunkaArtur GunkaArtur self-assigned this Feb 28, 2024
@GunkaArtur GunkaArtur force-pushed the 25687-pagesAPI branch 7 times, most recently from 30eb203 to d993631 Compare March 12, 2024 13:25
Comment thread brizy.php Outdated
}

define('BRIZY_DEVELOPMENT', false );
define('BRIZY_DEVELOPMENT', true );
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

rollback

Comment thread public/editor-client/src/config.ts Outdated
Comment on lines +103 to +106
// pagesUrl: pipe(
// mPipe(Obj.readKey("pagesUrl"), Str.read),
// throwOnNullish("Invalid API Config: stories")
// )
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

uncomments

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this will be in separate issue

Comment on lines +305 to +306
const imageUrl = "https://cloud-1de12d.b-cdn.net/media/iW=1024&iH=1024/";
const apiPagesUrl = "https://j6dfq8pl41.b-cdn.net/api";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

move to config

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this will be in separate issue

Comment on lines +311 to +319
const meta = await fetchAllLayouts<PagesAPI>(
`${apiPagesUrl}/get-pages`,
50
);

res({
blocks: convertPages(meta, imageUrl),
categories: getUniqueLayoutsCategories(meta)
});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

create the fn inside api folder same as savedLayouts

): Promise<T[]> => {
let allElements: T[] = [];

const firstPageResponse = await fetch(`${url}?per_page=${itemsPerPage}`).then(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

the urls need to be create with makeUrl fn

@GunkaArtur GunkaArtur force-pushed the 25687-pagesAPI branch 3 times, most recently from 2e43940 to cf0edb5 Compare March 28, 2024 11:39
@GunkaArtur GunkaArtur force-pushed the 25687-pagesAPI branch 3 times, most recently from 49ee2d5 to 99b1b7e Compare April 26, 2024 10:39
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