Control DMSF via REST API #78
This commit is contained in:
parent
d61998f591
commit
03cf2db837
@ -277,7 +277,11 @@ class DmsfController < ApplicationController
|
|||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
format.api { render_validation_errors(@folder) }
|
format.api {
|
||||||
|
unless saved
|
||||||
|
render_validation_errors(@folder)
|
||||||
|
end
|
||||||
|
}
|
||||||
format.html {
|
format.html {
|
||||||
if saved
|
if saved
|
||||||
flash[:notice] = l(:notice_folder_created)
|
flash[:notice] = l(:notice_folder_created)
|
||||||
|
|||||||
4
app/views/dmsf/create.api.rsb
Normal file
4
app/views/dmsf/create.api.rsb
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
api.dmsf_folder do
|
||||||
|
api.id @folder.id
|
||||||
|
api.title @folder.title
|
||||||
|
end
|
||||||
@ -1,4 +1,4 @@
|
|||||||
api.file do
|
api.dmsf_file do
|
||||||
api.id @file.id
|
api.id @file.id
|
||||||
api.name @file.name
|
api.name @file.name
|
||||||
api.project_id @file.project_id
|
api.project_id @file.project_id
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user