(()=>{var t={};t.id=2623,t.ids=[2623],t.modules={3295:t=>{"use strict";t.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4448:(t,e,o)=>{"use strict";o.r(e),o.d(e,{patchFetch:()=>g,routeModule:()=>c,serverHooks:()=>N,workAsyncStorage:()=>p,workUnitAsyncStorage:()=>m});var s={};o.r(s),o.d(s,{POST:()=>d});var n=o(96559),a=o(48088),i=o(37719),r=o(32190),l=o(63095),u=o(49930);async function d(t){let e=await (0,l.A)().get((0,u.ll)`SELECT COUNT(*) as count
                                    FROM posts
                                    WHERE time_created >= datetime('now', '-1 day','localtime');`),o=await (0,l.A)().get((0,u.ll)`SELECT COUNT(*) as count
                                      FROM posts
                                      WHERE time_created >= datetime('now', '-3 day','localtime');`),s=await (0,l.A)().get((0,u.ll)`SELECT COUNT(*) as count
                                     FROM posts
                                     WHERE time_created >= datetime('now', '-7 day','localtime');`),n=await (0,l.A)().get((0,u.ll)`SELECT COUNT(*) as count
                                      FROM posts
                                      WHERE time_created >= datetime('now', '-1 month','localtime');`),a=await (0,l.A)().get((0,u.ll)`SELECT COUNT(*) as count
                                      FROM posts
                                      WHERE time_created >= datetime('now', '-6 month','localtime');`),i=await (0,l.A)().get((0,u.ll)`SELECT COUNT(*) as count
                                     FROM posts
                                     WHERE time_created >= datetime('now', '-1 year','localtime');`),d=await (0,l.A)().get((0,u.ll)`SELECT COUNT(*) as count
                                     FROM posts;`),c={oneDay:e.count,threeDay:o.count,oneWeek:s.count,oneMonth:n.count,sixMonth:a.count,oneYear:i.count,allTime:d.count};return Object.keys(c).length>0?r.NextResponse.json({data:c,success:!0}):r.NextResponse.json({data:c,success:!1})}let c=new n.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/[locale]/api/post/get-post-count-by-time/route",pathname:"/[locale]/api/post/get-post-count-by-time",filename:"route",bundlePath:"app/[locale]/api/post/get-post-count-by-time/route"},resolvedPagePath:"E:\\xampp01\\htdocs\\wx-saas\\timynote\\app\\[locale]\\api\\post\\get-post-count-by-time\\route.tsx",nextConfigOutput:"standalone",userland:s}),{workAsyncStorage:p,workUnitAsyncStorage:m,serverHooks:N}=c;function g(){return(0,i.patchFetch)({workAsyncStorage:p,workUnitAsyncStorage:m})}},10846:t=>{"use strict";t.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29294:t=>{"use strict";t.exports=require("next/dist/server/app-render/work-async-storage.external.js")},39300:(t,e,o)=>{"use strict";o.r(e),o.d(e,{categories:()=>d,medias:()=>u,metaRelations:()=>N,options:()=>l,posts:()=>c,tags:()=>p,templates:()=>m});var s=o(81598),n=o(70932),a=o(22077),i=o(89283),r=o(49930);let l=(0,s.D)("options",{id:(0,n.nd)("id").primaryKey({autoIncrement:!0}).notNull(),optionName:(0,a.sH)("option_name").default().notNull(),optionValue:(0,a.sH)("option_value").notNull()}),u=(0,s.D)("medias",{id:(0,n.nd)("id").primaryKey({autoIncrement:!0}),name:(0,i.Qq)("name").notNull(),description:(0,i.Qq)("description"),extension:(0,i.Qq)("extension").default("NA").notNull(),url:(0,i.Qq)("url").notNull(),timeCreated:(0,a.sH)("time_created").default((0,r.ll)`(CURRENT_TIMESTAMP)`),timeModified:(0,a.sH)("time_modified").default((0,r.ll)`(CURRENT_TIMESTAMP)`)}),d=(0,s.D)("categories",{id:(0,n.nd)("id").primaryKey({autoIncrement:!0}).notNull(),category:(0,a.sH)("category").notNull(),description:(0,a.sH)("description").notNull(),slug:(0,a.sH)("slug").notNull(),parent:(0,a.sH)("parent").notNull()}),c=(0,s.D)("posts",{id:(0,n.nd)("id").primaryKey({autoIncrement:!0}).notNull(),title:(0,i.Qq)("title").notNull(),content:(0,a.sH)("content"),slug:(0,a.sH)("slug").notNull(),timeCreated:(0,a.sH)("time_created").default((0,r.ll)`(CURRENT_TIMESTAMP)`).notNull(),timeModified:(0,a.sH)("time_modified").default((0,r.ll)`(NULL)`),status:(0,a.sH)("status").default("draft").notNull(),isTop:(0,a.sH)("is_top").notNull(),excerpt:(0,i.Qq)("excerpt"),featureImg:(0,i.Qq)("feature_img")}),p=(0,s.D)("tags",{id:(0,n.nd)("id").primaryKey({autoIncrement:!0}).notNull(),tag:(0,a.sH)("tag").notNull(),description:(0,a.sH)("description").notNull(),slug:(0,a.sH)("slug").notNull()}),m=(0,s.D)("templates",{id:(0,n.nd)("id").primaryKey({autoIncrement:!0}).notNull(),title:(0,i.Qq)("title").notNull(),content:(0,a.sH)("content").notNull()}),N=(0,s.D)("meta_relations",{id:(0,n.nd)("id").primaryKey({autoIncrement:!0}).notNull(),metaId:(0,a.sH)("meta_id"),type:(0,a.sH)("type"),postId:(0,a.sH)("post_id").references(()=>c.id)})},44870:t=>{"use strict";t.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:t=>{"use strict";t.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63095:(t,e,o)=>{"use strict";o.d(e,{A:()=>r});var s=o(87550),n=o.n(s),a=o(46267),i=o(39300);let r=()=>{let t=new(n())("./contents/data.db");return(0,a.f)(t,{schema:i})}},78335:()=>{},87550:t=>{"use strict";t.exports=require("better-sqlite3")},96487:()=>{}};var e=require("../../../../../webpack-runtime.js");e.C(t);var o=t=>e(e.s=t),s=e.X(0,[4447,580,902],()=>o(4448));module.exports=s})();