mirror of
https://github.com/typicode/json-server.git
synced 2025-08-02 02:53:21 +08:00
Allows for alternate foreign key attribute names, eg snake case (post_id). Defaults to 'Id' (#556)
This commit is contained in:

committed by
typicode

parent
02c3ea936e
commit
f1d7677d01
@ -42,9 +42,8 @@ function createApp (source, object, routes, middlewares, argv) {
|
||||
|
||||
try {
|
||||
router = jsonServer.router(
|
||||
is.JSON(source)
|
||||
? source
|
||||
: object
|
||||
is.JSON(source) ? source : object,
|
||||
argv
|
||||
)
|
||||
} catch (e) {
|
||||
console.log()
|
||||
|
Reference in New Issue
Block a user