Title: How to distinguish controllers that return an object or a list? · Issue #7 · php-coder/query2app · GitHub
Open Graph Title: How to distinguish controllers that return an object or a list? · Issue #7 · php-coder/query2app
X Title: How to distinguish controllers that return an object or a list? · Issue #7 · php-coder/query2app
Description: At this moment we have get verb that accepts a SELECT query. Some endpoints return a single object (GET /category/1) while others return a list (GET /categories). In addition, when we expect an object, code should return 404 error for an...
Open Graph Description: At this moment we have get verb that accepts a SELECT query. Some endpoints return a single object (GET /category/1) while others return a list (GET /categories). In addition, when we expect an obj...
X Description: At this moment we have get verb that accepts a SELECT query. Some endpoints return a single object (GET /category/1) while others return a list (GET /categories). In addition, when we expect an obj...
Opengraph URL: https://github.com/php-coder/query2app/issues/7
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"How to distinguish controllers that return an object or a list?","articleBody":"At this moment we have `get` verb that accepts a `SELECT` query. Some endpoints return a single object (`GET /category/1`) while others return a list (`GET /categories`). In addition, when we expect an object, code should return 404 error for an empty result, while for a list, it should return an empty list. Example:\r\n```yaml\r\n- path: /categories/:id\r\n get: SELECT id,name FROM categories WHERE id = :id\r\n- path: /categories\r\n get: SELECT id,name FROM categories\r\n```\r\nHow we can distinguish such cases so we can generate different code?","author":{"url":"https://github.com/php-coder","@type":"Person","name":"php-coder"},"datePublished":"2020-07-15T18:13:32Z","url":"https://github.com/php-coder/query2app/issues/7"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6be4bbab-9de3-211c-80e7-e92c47ce066f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 96C0:12F4B3:D44E4:12207D:6AFE33BE |
| html-safe-nonce | 46e8495f279d20dfab7689637ff3c452cd84747339984b09a8d56cb27e40efc3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NkMwOjEyRjRCMzpENDRFNDoxMjIwN0Q6NkFGRTMzQkUiLCJ2aXNpdG9yX2lkIjoiNTEwNDgyNTA1NTUyMzUxNzM3NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c16a2499ce1feb9dff63e774ff45f1d1f3e5ca675948b13934401898bf3f5a7b |
| hovercard-subject-tag | issue:657553390 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/php-coder/query2app/7/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a372121f4add5eed5bfe664f74b5f6b99b5304b418d26401f222332ac1605556/php-coder/query2app/issues/7 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a372121f4add5eed5bfe664f74b5f6b99b5304b418d26401f222332ac1605556/php-coder/query2app/issues/7 |
| og:image:alt | At this moment we have get verb that accepts a SELECT query. Some endpoints return a single object (GET /category/1) while others return a list (GET /categories). In addition, when we expect an obj... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | php-coder |
| hostname | github.com |
| expected-hostname | github.com |
| None | d70e31220a67f6376c108d2416fa8e7df854c1065b1672ab7a88ab6dc3a809e2 |
| turbo-cache-control | no-preview |
| go-import | github.com/php-coder/query2app git https://github.com/php-coder/query2app.git |
| octolytics-dimension-user_id | 87088 |
| octolytics-dimension-user_login | php-coder |
| octolytics-dimension-repository_id | 279082426 |
| octolytics-dimension-repository_nwo | php-coder/query2app |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 279082426 |
| octolytics-dimension-repository_network_root_nwo | php-coder/query2app |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ccb88d9c92abe69245b429398c8a57ae87070c7c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width