Skip to content

Commit

Permalink
Login/ halfway though sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovy95 committed Feb 26, 2020
1 parent 94e66cb commit b603ba4
Show file tree
Hide file tree
Showing 8 changed files with 634 additions and 40 deletions.
12 changes: 12 additions & 0 deletions app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@ class MakersBnB < Sinatra::Base

end

get '/session/new' do
erb ":session/new"
end

post '/sessions' do
user = User.authenticate(email: params[:email], password: params[:password])
session[]
User.find(name: params['name'], email: params['email'], password: params['password'])
#Working progress
end


post '/users' do
@users = User.all
p @users
Expand Down
54 changes: 47 additions & 7 deletions coverage/.resultset.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"RSpec": {
"coverage": {
"/Users/student/Programming/Makers/Projects/MakersBnB/spec/features/create_space_spec.rb": {
"/Users/jack/Documents/MAKERs bnb/MakersBnB/spec/features/create_space_spec.rb": {
"lines": [
1,
1,
Expand All @@ -16,7 +16,7 @@
null
]
},
"/Users/student/Programming/Makers/Projects/MakersBnB/spec/features/sign_up_spec.rb": {
"/Users/jack/Documents/MAKERs bnb/MakersBnB/spec/features/logging_page_spec.rb": {
"lines": [
1,
1,
Expand All @@ -30,20 +30,47 @@
1,
1,
1,
null,
null,
0,
0,
0,
0,
null,
null,
null,
null,
null
]
},
"/Users/jack/Documents/MAKERs bnb/MakersBnB/spec/features/sign_up_spec.rb": {
"lines": [
1,
1,
1,
1,
null,
null,
null,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
null,
null,
null,
null
]
},
"/Users/student/Programming/Makers/Projects/MakersBnB/spec/features/testing_infrastructure_spec.rb": {
"/Users/jack/Documents/MAKERs bnb/MakersBnB/spec/features/testing_infrastructure_spec.rb": {
"lines": [
1,
1,
Expand All @@ -54,7 +81,7 @@
null
]
},
"/Users/student/Programming/Makers/Projects/MakersBnB/spec/unit/create_user_spec.rb": {
"/Users/jack/Documents/MAKERs bnb/MakersBnB/spec/unit/create_user_spec.rb": {
"lines": [
1,
1,
Expand All @@ -65,10 +92,23 @@
1,
null,
null,
null,
1,
1,
1,
1,
1,
1,
null,
null,
null,
null,
null,
null,
null
]
},
"/Users/student/Programming/Makers/Projects/MakersBnB/spec/unit/space_spec.rb": {
"/Users/jack/Documents/MAKERs bnb/MakersBnB/spec/unit/space_spec.rb": {
"lines": [
1,
1,
Expand Down Expand Up @@ -97,6 +137,6 @@
]
}
},
"timestamp": 1582713004
"timestamp": 1582718033
}
}
Loading

0 comments on commit b603ba4

Please sign in to comment.