MCPcopy Index your code
hub / github.com/hydro-dev/Hydro / BlogUserHandler

Class BlogUserHandler

packages/blog/index.ts:115–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115class BlogUserHandler extends BlogHandler {
116 @param('uid', Types.Int)
117 @param('page', Types.PositiveInt, true)
118 async get(domainId: string, uid: number, page = 1) {
119 const [ddocs, dpcount] = await this.ctx.db.paginate(
120 BlogModel.getMulti({ owner: uid }),
121 page,
122 10,
123 );
124 const udoc = await UserModel.getById(domainId, uid);
125 this.response.template = 'blog_main.html';
126 this.response.body = {
127 ddocs,
128 dpcount,
129 udoc,
130 page,
131 };
132 }
133}
134
135class BlogDetailHandler extends BlogHandler {
136 @param('did', Types.ObjectId)

Callers

nothing calls this directly

Calls 1

paramFunction · 0.85

Tested by

no test coverage detected