Skip to content

Commit

Permalink
add a readonly file
Browse files Browse the repository at this point in the history
Signed-off-by: Doug Davis <[email protected]>
  • Loading branch information
duglin committed Feb 20, 2025
1 parent 17a7720 commit 597d1a7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmds/server/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,10 @@ func LoadDirsSample(reg *registry.Registry) *registry.Registry {
ErrFatalf(r.SetSave("file", `{"hello":"world"}`))
ErrFatalf(r.SetSave("contenttype", `application/json`))

r, err = g.AddResource("files", "fr", "v1")
ErrFatalf(err)
ErrFatalf(r.SetSaveMeta("readonly", true))

_, err = g.AddResource("datas", "d1", "v1")

_, err = g.AddResourceWithObject("files", "fx", "",
Expand Down

0 comments on commit 597d1a7

Please sign in to comment.