Skip to content

Commit

Permalink
add /doc/api route
Browse files Browse the repository at this point in the history
  • Loading branch information
imadbourouche committed Jan 28, 2025
1 parent 9243211 commit 38d5a95
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion controllers/home_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ class HomeController < ApplicationController
halt 204

Check warning on line 54 in controllers/home_controller.rb

View check run for this annotation

Codecov / codecov/patch

controllers/home_controller.rb#L54

Added line #L54 was not covered by tests
end

get "doc/api" do
redirect "/documentation", 301

Check warning on line 58 in controllers/home_controller.rb

View check run for this annotation

Codecov / codecov/patch

controllers/home_controller.rb#L58

Added line #L58 was not covered by tests
end

get "documentation" do
@metadata_all = metadata_all.sort { |a, b| a[0].name <=> b[0].name }
haml "documentation/documentation".to_sym, :layout => "documentation/layout".to_sym
Expand Down Expand Up @@ -257,7 +261,7 @@ def create_catalog
catalog = nil
catalogs = LinkedData::Models::SemanticArtefactCatalog.all
if catalogs.nil? || catalogs.empty?
catalog = instance_from_params(LinkedData::Models::SemanticArtefactCatalog, {"acronym" => "ontoportal"})
catalog = instance_from_params(LinkedData::Models::SemanticArtefactCatalog, {"test_attr_to_persist" => "test_to_persist"})
if catalog.valid?
catalog.save

Check warning on line 266 in controllers/home_controller.rb

View check run for this annotation

Codecov / codecov/patch

controllers/home_controller.rb#L261-L266

Added lines #L261 - L266 were not covered by tests
else
Expand Down

0 comments on commit 38d5a95

Please sign in to comment.