Skip to content

cleanup symfony routes #24

@tpreusse

Description

@tpreusse
nzz_my_town_admin_points_publish:
    pattern:  /point/publish/{pointId}
nzz_my_town_admin_points_unpublish:
    pattern:  /point/unpublish/{pointId}
nzz_my_town_admin_points_remove:
    pattern:  /point/remove/{pointId}

part of admin - they should probably be prefixed with /admin

make FE routes more RESTful and consistent (see comments in grey)

nzz_my_town_homepage:
    pattern:  /{projectSlug}/{lang} # no more /show
    defaults: { _controller: NZZMyTownBundle:Default:index }
    requirements:
        lang: '\w{2}'
        projectSlug: '[^/]*'
        _method: GET

nzz_my_town_api_get_all: # maybe add points to the route name
    pattern:  /{projectSlug}/{lang}/points # consistent path with rest of FE routes
    defaults: { _controller: NZZMyTownBundle:Api:getAll }
    requirements:
        lang: '\w{2}'
        projectSlug: '[^/]*'

nzz_my_town_api_save: # maybe add points to the route name
    pattern:  /{projectSlug}/{lang}/points # add /points to be clear what it is
    defaults: { _controller: NZZMyTownBundle:Api:save }
    requirements:
        lang: '\w{2}'
        projectSlug: '[^/]*'
        _method: POST

nzz_my_town_api_points: # api_points is a bad name since it return the project data
    pattern:  /{projectSlug}/{lang}/project # add /project
    defaults: { _controller: NZZMyTownBundle:Api:index }
    requirements:
        lang: '\w{2}'
        projectSlug: '[^/]*'
        _method: GET

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions