-
Notifications
You must be signed in to change notification settings - Fork 81
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
pages API #1986
base: develop
Are you sure you want to change the base?
pages API #1986
Conversation
30eb203
to
d993631
Compare
brizy.php
Outdated
@@ -17,7 +17,7 @@ | |||
$_SERVER['HTTPS'] = 'on'; | |||
} | |||
|
|||
define('BRIZY_DEVELOPMENT', false ); | |||
define('BRIZY_DEVELOPMENT', true ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rollback
public/editor-client/src/config.ts
Outdated
// pagesUrl: pipe( | ||
// mPipe(Obj.readKey("pagesUrl"), Str.read), | ||
// throwOnNullish("Invalid API Config: stories") | ||
// ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uncomments
There was a problem hiding this comment.
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
const imageUrl = "https://cloud-1de12d.b-cdn.net/media/iW=1024&iH=1024/"; | ||
const apiPagesUrl = "https://j6dfq8pl41.b-cdn.net/api"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move to config
There was a problem hiding this comment.
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
const meta = await fetchAllLayouts<PagesAPI>( | ||
`${apiPagesUrl}/get-pages`, | ||
50 | ||
); | ||
|
||
res({ | ||
blocks: convertPages(meta, imageUrl), | ||
categories: getUniqueLayoutsCategories(meta) | ||
}); |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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
2e43940
to
cf0edb5
Compare
49ee2d5
to
99b1b7e
Compare
03c2607
to
fc6ef12
Compare
Related issue https://github.com/bagrinsergiu/blox-editor/issues/25687