热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

OptimizingProfileURLstoFunctionExclusivelywithUsernames,EliminatingtheNeedforUserIDs

Fixes #1356Changes proposed in this pull request:Drop support for ID in profile urls. Only accept us

Fixes #1356

Changes proposed in this pull request:
Drop support for ID in profile urls. Only accept username.

Reviewers should focus on:
This is based on one of the proposal discussed in the issue. However I'm not sure how to handle errors, as "not found" is now an empty list instead of a native 404.

Also the fact that

1
apiDocument

is now a list could break some extensions that read the payload directly. I'm thinking of the SEO extension which I have not tested in combination with this.

Confirmed

  • [x] Frontend changes: tested on a local Flarum installation.

  • [ ] Backend changes: tests are green (run
    1
    composer test

    ).


Required changes:

  • [ ] Related documentation PR: (Remove if irrelevant)

  • [ ] Related core extension PRs: (Remove if irrelevant)

该提问来源于开源项目:flarum/core

I'm closing this for now. I still don't like the approach enough.





   



推荐阅读
author-avatar
空荡荡跑龙套
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有