mirror of
https://github.com/Qortal/qortal.git
synced 2025-02-14 19:25:48 +00:00
"default" is now a reserved keyword when used as an identifier.
Requesting a resource with the identifier "default" now maps to a blank string. This allows the /arbitrary/{service}/{name}/{identifier} endpoints to be used for default resources too, as they previously didn't support a blank string as the third parameter.
This commit is contained in:
parent
44d8bfd763
commit
37e4f1e8d5
@ -65,8 +65,8 @@ public class ArbitraryDataReader {
|
|||||||
resourceId = resourceId.toLowerCase();
|
resourceId = resourceId.toLowerCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
// If identifier is a blank string, treat it as null
|
// If identifier is a blank string, or reserved keyword "default", treat it as null
|
||||||
if (identifier == null || identifier.equals("")) {
|
if (identifier == null || identifier.equals("") || identifier.equals("default")) {
|
||||||
identifier = null;
|
identifier = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,9 +109,6 @@ elif [[ "${method}" == "GET" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Handle default
|
# Handle default
|
||||||
if [[ "${identifier}" == "default" ]]; then
|
|
||||||
identifier=""
|
|
||||||
fi
|
|
||||||
if [[ "${filepath}" == "default" ]]; then
|
if [[ "${filepath}" == "default" ]]; then
|
||||||
filepath=""
|
filepath=""
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user