Commit graph

19 commits

Author SHA1 Message Date
Takuya N
05fcdfcb2e
Replace forem/forem instead of thepracticaldev/dev.to (#17626)
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2022-05-10 07:26:50 -04:00
rhymes
fd5643bc9d
Improve API controllers efficiency by selecting only columns needed for serialization (#5805) [deploy] 2020-02-06 07:36:56 -05:00
Nadiya Karachevska
df857d860a Fix API inconsistencies between articles 'index' and 'show' (#4560)
* Fix API inconsistencies between articles 'index' and 'show'

* Update API docs; revert tags from articles index

* Fix specs

* Update specs
2019-10-24 11:56:55 -04:00
cyrillefr
82cca496fd Add collection ids to Api (reading + filtering) (#4180)
* Add collection ids to Api (reading + filtering)

  - refactored controller
  - modifyied views
  - added tests

* Add collection ids to Api (reading + filtering): requested changes

  - changed order in service
  - proper test in filtering
2019-10-03 11:26:39 -04:00
cyrillefr
70631ad2f7 Listings creation and update API (#4014)
* Listings creation and update API

  - new listings controller
  - refactored code to share core functionnality between api and web controllers
  - code in common in classified listing concerns
  - added tests for index/create/update
  - json output as views
  - updated a factory

* Listings creation and update API: code update

  - refactored json calls
  - added test cases
  - added pagination for list of listings
  - refactored jbuilder files
  - typos

* Listings creation and update API: code update

  - tags and tag_list in controller
  - changed view to display both
  - refactored and added test

* Listings creation and update API: code update

  - small change to resolve conflit

* Listings creation and update API: code update

  - added test case
  - deleted unneeded test case
2019-09-24 07:03:52 -07:00
rhymes
e9db50b7c9 API docs: Document OAuth2 and /api/articles/me (#3707) 2019-08-12 16:00:12 -04:00
rhymes
35526bef9b API: OpenAPI 3 spec and auto generated docs (#3650) 2019-08-12 11:36:04 -04:00
Zak Henry
a9acb8642e Add markdown to article api response (#3394)
* Add failing test asserting markdown is returned

* Add markdown to the get article api response
2019-07-09 10:09:20 -04:00
rhymes
5e94533f0b Articles API: fix update org and add datetimes (#2913)
* Allow the article to be assigned to an org on update

* Add all the relevant datetimes, those available in the export

* Not all dates are always available
2019-05-21 09:53:30 -04:00
rhymes
2660ae1739 Use cached_tag_list_array for tags (#2857) 2019-05-16 23:29:57 -04:00
rhymes
941ab4178b Articles API: create and update (#2844)
* Add system test to create article from the editor

* Move article creation from API to app controller

* Fix system test to edit posts

* Move article update from API to app controller

* Rewrite create article API using API key

* Add main_image and canonical_url to allowed creation params

* Rewrite update article API using API key

* Fix tests and have Comments API inherit from API
2019-05-16 12:26:24 -04:00
rhymes
4e591fea1c Show localized date/time on hover for articles/comments (#2722)
* Add article decorator published_timestamp

* Use time HTML5 element and refactor date in partial

* Add published_timestamp to Article

Adding `published_timestamp` to the homepage we can then use JS to render the full timestamp localized for the user.

We've also added the timestamp to the index and the API

* Display article published timestamp on hover

* Use time also in the article show page

* Add timestamp to bottom articles as well

* Remove published_timestamp from index because it is not used

* Fix broken specs

* Add more article dates specs

* Refactor date initializers
2019-05-09 11:05:17 -04:00
Mike Coutermarsh
4c9959f0ff Social Cards Part 2 (#2188)
* Social Cards Part 2

This is a follow up to part 1: https://github.com/thepracticaldev/dev.to/pull/2090.

This PR updates the og:image URLs to use the new social_preview.png urls
added in Part 1.

So that the already generated/cached images do not need to be recreated,
this sets a MIGRATION_DATETIME. Any object that has been updated after
that date will generate a new image

Objects from before that date will not. They will use the new url.

* Fix weird change made by rubocop autocorrect

* Handle organizations + users

* Run CI

* Use time with zone to be explicit about timezone

* Simplify branching in user_social_image_url method

* Fix param alignment + bump migration date
2019-05-01 11:07:25 -04:00
Tim Lange
3494264404 Enabled rubocop/lint (#2130)
* WIP: Enabled rubocop/lint

* FIX: Fixed failing test

* FIX: Small change to return

* FIX: Changed indent
2019-03-21 10:53:44 -04:00
Kohei Sugi
36a895e521 Fix Lint/AmbiguousBlockAssociation (#454) 2018-08-30 12:51:21 -04:00
rhymes
e588fa7ece Code cleanups (#659)
* Initial automatic cleanup with rubocop

* Fix syntax error introduced by rubocop

* Cleanup seeds file

* Cleanup lib folder

* Exclude bin folder because it contains auto generated files

* Make Rubocop a little bit more chatty

* Block length should not include comments in the count

* Cleanup config folder

* Cleanup specs

* Updated Rubocop version and generated a todo file

* Fix broken ArticlesApi spec

* Fix tests

* Restored rubocop pre-commit hook
2018-08-07 11:00:13 -04:00
Ben Halpern
e2dbd7cfcc
Remove beta label on /connect and other small changes (#589)
* Remove beta label on /connect and other small changes

* Add better placeholder for narrow screens

* Adjust comma/bracket placement

* Add description to chat channels
2018-07-16 14:48:38 -04:00
Ben Halpern
1b68c284b0
Add cloudinary prefix to articles/show (#586) 2018-07-13 20:40:47 -04:00
Mac Siri
301c6080e3 Initial commit 2018-02-28 16:11:08 -05:00