File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed
Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ function SavedPageList() {
6161 className = "flex justify-between bg-primary/20 rounded p-2 select-none cursor-pointer"
6262 onClick = { ( ) => handlePageClick ( page . id ) }
6363 >
64- < div className = "flex-1" > { page . title } </ div >
64+ < div className = "flex-1 text-nowrap text-ellipsis overflow-hidden " > { page . title } </ div >
6565 < div > { formatTime ( page . createdAt ) } </ div >
6666 </ div >
6767 )
Original file line number Diff line number Diff line change @@ -131,6 +131,30 @@ app.post(
131131 } ,
132132)
133133
134+ app . post (
135+ '/query_all_page_ids' ,
136+ validator ( 'json' , ( value , c ) => {
137+ const schema = z . object ( {
138+ folderId : z . number ( {
139+ message : 'Folder ID should be a number' ,
140+ } ) ,
141+ } )
142+
143+ const parsed = schema . safeParse ( value )
144+ if ( ! parsed . success ) {
145+ return c . json ( result . error ( 400 , parsed . error . errors [ 0 ] . message ) )
146+ }
147+
148+ return parsed . data
149+ } ) ,
150+ async ( c ) => {
151+ const { folderId } = c . req . valid ( 'json' )
152+ const pages = await queryAllPageIds ( c . env . DB , folderId )
153+
154+ return c . json ( result . success ( pages ) )
155+ } ,
156+ )
157+
134158app . post (
135159 '/query_by_url' ,
136160 validator ( 'json' , ( value , c ) => {
You can’t perform that action at this time.
0 commit comments