Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #135 from nodes-vapor/vapor-4
Browse files Browse the repository at this point in the history
Add tests badge in the README file
  • Loading branch information
siemensikkema authored Jun 15, 2020
2 parents b7d7bbe + e5581b5 commit bbe43d4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Documentation

on: [release]
on:
release:
types: [published]

jobs:
build:
Expand Down
2 changes: 0 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ let package = Package(
.library(name: "Keychain", targets: ["Keychain"])
],
dependencies: [
.package(url: "https://github.com/vapor/fluent.git", from: "4.0.0-rc"),
.package(url: "https://github.com/vapor/jwt.git", from: "4.0.0-rc"),
.package(url: "https://github.com/vapor/vapor.git", from: "4.0.0"),
.package(url: "https://github.com/nodes-vapor/submissions.git", from: "3.0.0-rc")
Expand All @@ -20,7 +19,6 @@ let package = Package(
.target(
name: "Keychain",
dependencies: [
.product(name: "Fluent", package: "fluent"),
.product(name: "JWT", package: "jwt"),
.product(name: "Vapor", package: "vapor"),
.product(name: "Submissions", package: "submissions"),
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Keychain ⛓
[![Swift Version](https://img.shields.io/badge/Swift-5.2-brightgreen.svg)](http://swift.org)
[![Vapor Version](https://img.shields.io/badge/Vapor-4-30B6FC.svg)](http://vapor.codes)
![tests](https://github.com/nodes-vapor/keychain/workflows/test/badge.svg)
[![codebeat badge](https://codebeat.co/badges/04ee1891-95e9-483e-99c1-44a9191d1d8a)](https://codebeat.co/projects/github-com-nodes-vapor-keychain-master)
[![Readme Score](http://readme-score-api.herokuapp.com/score.svg?url=https://github.com/nodes-vapor/keychain)](http://clayallsopp.github.io/readme-score?url=https://github.com/nodes-vapor/keychain)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/nodes-vapor/keychain/master/LICENSE)
Expand Down
8 changes: 3 additions & 5 deletions Sources/Keychain/ResetPasswordRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ public extension ResetPasswordRequest {

public extension ResetPasswordRequest where Model: Authenticatable {
static func updatePassword(on request: Request) -> EventLoopFuture<Model> {
do {
return updatePassword(for: try request.auth.require(), on: request)
} catch {
return request.eventLoop.makeFailedFuture(error)
}
request.eventLoop
.future(result: .init { try request.auth.require() })
.flatMap { updatePassword(for: $0, on: request)}
}
}

0 comments on commit bbe43d4

Please sign in to comment.