Commit graph

20 commits

Author SHA1 Message Date
AarDG10
8d898a4ebc fix: add perm check to get_values_for_link_and_dynamic_link_fields 2026-04-01 17:32:35 +05:30
Akhil Narang
0fd745ae57
fix(api/v1): don't use as_dict() unless expand_links is passed (#34672)
That sets all keys to null if they don't exist, a breaking change.

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-11-11 17:44:39 +00:00
Sumit Bhanushali
f5fed5b4be perf: optimize expand link for table fields 2025-10-27 13:00:43 +05:30
Akhil Narang
8e4cf29e2c
fix: use sbool to cast parameter to bool
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-10-17 16:45:54 +05:30
Sumit Bhanushali
f8c73cb254 fix: replace key with object when expand is given in query param 2025-10-15 12:56:23 +05:30
Sumit Bhanushali
36012487f9 fix: updated keys and link response to return full object instead of just title 2025-10-03 15:31:53 +05:30
Sumit Bhanushali
3ad961e8dd feat: support expand links in read_doc, document_list and client.get_list 2025-09-19 10:54:57 +05:30
Akhil Narang
ad948c9b98
Revert "Merge pull request #32327 from akhilnarang/allow-passing-name-in-api"
This reverts commit 1e30db26dc, reversing
changes made to 8da72e91e3.
2025-07-03 17:23:48 +05:30
Akhil Narang
33dbf97db2
fix(document): don't try to overwrite name if a string is already set
This allows us to pass `name` in via API when creating documents.

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-05-05 12:24:58 +05:30
Raffael Meyer
9208b58b6f
refactor: use doc.check_permission (#28317)
* refactor: use `doc.check_permission`

* refactor(delete_doc): check_permission_and_not_submitted
2024-11-22 10:41:24 +01:00
Ankush Menat
10ace97ebb fix: backward compatiblity for method calls in v1
Preserves complete path just like before. This broke oauth as oauth code
was expecting 4th part in path even though it's never been supported in
API methods
2023-10-16 18:12:53 +05:30
Ankush Menat
825692128f chore: separate out v1 and v2
Any common utils end up becoming a problem, duplicating code here is
better than coupling potentially breaking behaviour
2023-10-16 18:12:53 +05:30
Ankush Menat
275f16060a fix: route ambiguitities and / in name
v1 and v2:
- Use path convertor to consume entire document which MIGHT contain `/`
- Drop string convertor, as it's the default
- Dont merge slashes - avoid consuming something that's part of name

v2:
- `SI/BLAH/BLAH/submit` is not simple to parse without ambiguitity
- `SI/BLAH/BLAH/method/submit` removes ambiguitity for 99.99% cases.
2023-10-16 18:12:53 +05:30
Ankush Menat
627b777a9c refactor!: manual creation of response
This contains minor breaking change where `delete` API call now returns `OK` in `data` key instead of `message`.
2023-10-16 18:12:53 +05:30
Ankush Menat
b57ca948ab refactor: common API methods to utils 2023-10-16 18:12:53 +05:30
Ankush Menat
8ce6426c75 refactor: Drop frappe.local for proxies 2023-10-16 18:12:53 +05:30
Ankush Menat
f9e120c104 refactor: remove unnessary manual commits 2023-10-16 18:12:53 +05:30
Ankush Menat
b064d12440 feat: Shorthand for whitelisted function call in controllers
```diff
- GET /api/method/frappe.core.doctype.user.user.get_timezones
+ GET /api/method/User/get_timezones
```
2023-10-16 18:12:53 +05:30
Ankush Menat
1b51914a83 refactor: create two API versions 2023-10-16 18:12:53 +05:30
Ankush Menat
5af6624cce refactor: Use werkzeug router for API routing 2023-10-16 18:12:53 +05:30