How to use the meta.author function in meta

To help you get started, weā€™ve selected a few meta examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TerryChenUI / ivqBlog / source / www / routes / article.js View on Github external
.put('/api/articles/:id', jwtAuth, function (req, res, next) {
        var modify = req.body;
        var nowTime = Date.now();
        modify["time.update"] = nowTime;
        if (modify.publish) {
            modify["time.publish"] = nowTime;
        }
        if (modify.meta != undefined) {
            if (modify.meta.author != undefined) {
                modify["meta.author"] = modify.meta.author;
            }
            if (modify.meta.keyword != undefined) {
                modify["meta.keyword"] = modify.meta.keyword;
            }
            if (modify.meta.description != undefined) {
                modify["meta.description"] = modify.meta.description;
            }
            delete modify.meta;
        }
        if(modify.category != undefined && modify.category == 0) {
            modify.category = undefined;
        }

        Article.update2(req.params.id, modify, function (err) {
            if (err)
                return res.status(500).send(err);

meta

tool for turning many repos into a meta repo. why choose many repos or a monolithic repo, when you can have both with a meta repo?

MIT
Latest version published 3 years ago

Package Health Score

53 / 100
Full package analysis