-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from therealharsh/master
merging tags
- Loading branch information
Showing
4 changed files
with
38 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package controllers | ||
|
||
import play.api._ | ||
import play.api.mvc._ | ||
import services.logic.TagHandler._ | ||
|
||
class TagController extends Controller { | ||
|
||
def createTag(name: String) = Action { | ||
val tag = create(name) | ||
Ok("Request completed") | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package services.logic | ||
|
||
import services.model.Tag | ||
import java.util.UUID | ||
import org.joda.time.DateTime | ||
|
||
object TagHandler { | ||
|
||
def create(name: String): Tag = { | ||
val tag = new Tag(UUID.randomUUID(), name, new DateTime) | ||
return tag | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters