Skip to content

Commit ad8b6c8

Browse files
committed
Added upload update, delete
1 parent 57e23db commit ad8b6c8

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

Diff for: README.md

+15-4
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,14 @@ TODO
7979
- [x] User scaffold and JWT for user authenticate Gem https://github.com/x1wins/jwt-rails
8080
- [x] User role http://railscasts.com/episodes/189-embedded-association?view=asciicast https://github.com/ryanb/cancan/wiki/Role-Based-Authorization
8181
- [x] Category scaffold
82-
8382
- [x] Post scaffold
8483
- [x] Comment scaffold
8584
- [x] Model Serializer https://itnext.io/a-quickstart-guide-to-using-serializer-with-your-ruby-on-rails-api-d5052dea52c5
8685
- [x] Rspec https://relishapp.com/rspec/rspec-rails/docs/gettingstarted
8786
- [x] Swager https://github.com/rswag/rswag
8887
- [x] Add published condition of association https://www.rubydoc.info/gems/active_model_serializers/0.9.4
8988
- [x] Search in posts
90-
- [ ] Pagination https://github.com/kaminari/kaminari
89+
- [x] Pagination https://github.com/kaminari/kaminari
9190
- [x] categories#index
9291
- [x] posts#index
9392
- [x] posts#index Comments
@@ -103,7 +102,10 @@ TODO
103102
- [ ] model tracking https://github.com/paper-trail-gem/paper_trail
104103
- [x] ELK https://github.com/deviantony/docker-elk
105104
- [x] Versioning http://railscasts.com/episodes/350-rest-api-versioning?view=asciicast
106-
- [x] File upload to Local path with active storage https://edgeguides.rubyonrails.org/active_storage_overview.html https://edgeguides.rubyonrails.org/active_storage_overview.html#has-many-attached
105+
- [ ] File upload to Local path with active storage https://edgeguides.rubyonrails.org/active_storage_overview.html https://edgeguides.rubyonrails.org/active_storage_overview.html#has-many-attached
106+
- [x] create
107+
- [ ] update
108+
- [ ] delete
107109
- [ ] docker-compose
108110
- [ ] staging
109111
- [ ] production
@@ -380,7 +382,7 @@ end
380382
curl -X POST -i http://localhost:3000/posts -d '{"post": {"body":"Average Speed Time Time Time Current"}}' -H "Content-Type: application/json" -H "Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoyLCJleHAiOjE1Nzc0OTMwMjl9.s9WqkyM84LQGZUtpmfmZzWN8rsVUp4_yfKfxEN_t4AQ"
381383
```
382384
383-
> file upload
385+
> file upload - create
384386
```bash
385387
curl -H "Authorization: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJleHAiOjE1ODExOTA3NTV9.oaPeMu1hoinllzFGKb_7frFPwdyYzbR0wc93GOMBTeI" \
386388
-F "post[body]=string123" \
@@ -389,6 +391,15 @@ end
389391
-F "post[files][]=@/Users/rhee/Desktop/item/log/47310817701116.csv" \
390392
-X POST http://localhost:3000/api/v1/posts
391393
```
394+
395+
> file upload - update
396+
```bash
397+
curl -H "Authorization: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJleHAiOjE1ODE0NjM2MzR9.ItmuYyoSGXJczyzzROV8JW8POEiSYBpqeONyYvBLY7Y" \
398+
-F "post[body]=aasadsadasdasstring123" \
399+
-F "post[files][]=@/Users/rhee/Desktop/item/log/47310817701116.csv" \
400+
-F "post[files][]=@/Users/rhee/Desktop/item/log/47310817701116.csv" \
401+
-X PUT http://localhost:3000/api/v1/posts/469
402+
```
392403
4. Index Post
393404
```bash
394405
curl -X GET http://localhost:3000/posts -H "Content-Type: application/json" -H "Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJleHAiOjE1Nzc0OTAyNjJ9.PCY7kXIlImORySIeDd78gErhqApAyGP6aNFBmK_mdXY" | jq

0 commit comments

Comments
 (0)