Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mobildata-server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
btomi96
mobildata-server
Commits
b0a7e22b
Commit
b0a7e22b
authored
May 4, 2017
by
Alexandre Grison
Browse files
Options
Downloads
Patches
Plain Diff
fix favorite
parent
5ee13e68
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/kotlin/io/realworld/ApiApplication.kt
+2
-2
2 additions, 2 deletions
src/main/kotlin/io/realworld/ApiApplication.kt
src/main/kotlin/io/realworld/model/inout/Profile.kt
+1
-1
1 addition, 1 deletion
src/main/kotlin/io/realworld/model/inout/Profile.kt
with
3 additions
and
3 deletions
src/main/kotlin/io/realworld/ApiApplication.kt
+
2
−
2
View file @
b0a7e22b
...
@@ -57,7 +57,7 @@ class ApiApplication(val tagRepository: TagRepository,
...
@@ -57,7 +57,7 @@ class ApiApplication(val tagRepository: TagRepository,
fun
validator
()
=
LocalValidatorFactoryBean
()
fun
validator
()
=
LocalValidatorFactoryBean
()
override
fun
run
(
vararg
p0
:
String
?)
{
override
fun
run
(
vararg
p0
:
String
?)
{
val
java
=
tagRepository
.
save
(
Tag
(
name
=
"java"
))
/*
val java = tagRepository.save(Tag(name = "java"))
val kotlin = tagRepository.save(Tag(name = "kotlin"))
val kotlin = tagRepository.save(Tag(name = "kotlin"))
val dev = tagRepository.save(Tag(name = "dev"))
val dev = tagRepository.save(Tag(name = "dev"))
val clojure = tagRepository.save(Tag(name = "clojure"))
val clojure = tagRepository.save(Tag(name = "clojure"))
...
@@ -84,7 +84,7 @@ class ApiApplication(val tagRepository: TagRepository,
...
@@ -84,7 +84,7 @@ class ApiApplication(val tagRepository: TagRepository,
favorited = mutableListOf(rich)))
favorited = mutableListOf(rich)))
articleRepository.save(Article(title = "Clojure spec", body = "Clojure spec!", slug = "clojure-spec",
articleRepository.save(Article(title = "Clojure spec", body = "Clojure spec!", slug = "clojure-spec",
author = rich, tagList = mutableListOf(dev, clojure),
author = rich, tagList = mutableListOf(dev, clojure),
favorited
=
mutableListOf
(
alex
)))
favorited = mutableListOf(alex)))
*/
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/main/kotlin/io/realworld/model/inout/Profile.kt
+
1
−
1
View file @
b0a7e22b
...
@@ -11,7 +11,7 @@ data class Profile(var username: String,
...
@@ -11,7 +11,7 @@ data class Profile(var username: String,
companion
object
{
companion
object
{
fun
fromUser
(
user
:
User
,
currentUser
:
User
):
Profile
{
fun
fromUser
(
user
:
User
,
currentUser
:
User
):
Profile
{
return
Profile
(
username
=
user
.
username
,
bio
=
user
.
bio
,
image
=
user
.
image
,
return
Profile
(
username
=
user
.
username
,
bio
=
user
.
bio
,
image
=
user
.
image
,
following
=
u
ser
.
follows
.
contains
(
currentU
ser
))
following
=
currentU
ser
.
follows
.
contains
(
u
ser
))
}
}
}
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment