-function createUserRetryWrapper (req: express.Request, res: express.Response, next: express.NextFunction) {
+async function getUserVideos (req: express.Request, res: express.Response, next: express.NextFunction) {
+ const user = res.locals.oauth.token.User
+ const resultList = await db.Video.listUserVideosForApi(user.id ,req.query.start, req.query.count, req.query.sort)
+
+ return res.json(getFormattedObjects(resultList.data, resultList.total))
+}
+
+async function createUserRetryWrapper (req: express.Request, res: express.Response, next: express.NextFunction) {