'Mark a link NSFW.
See also: [/api/unmarknsfw](#POST_api_unmarknsfw).'

@require_oauth2_scope('modposts')
@noresponse(VUser(), VModhash(), VSrCanAlter('id'), thing=VByName('id'))
@api_doc(api_section.links_and_comments)
def POST_marknsfw(self, thing):

    thing.over_18 = True
    thing._commit()
    if (c.user._id != thing.author_id):
        ModAction.create(thing.subreddit_slow, c.user, target=thing, action='marknsfw')
    thing.update_search_index()
