Skip to content

Commit

Permalink
Make the token naming consistent
Browse files Browse the repository at this point in the history
Because when we create the token, we have to tell the token is of
type=runservice, but when we ask about the tokens a user has, we get
that same token as kind=service instead.
  • Loading branch information
ddonisa committed Oct 24, 2023
1 parent 954c433 commit cd99f7d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/api/app/views/person/token/index.xml.builder
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
xml.directory(count: @list.length) do |dir|
@list.each do |token|
p = { id: token.id, string: token.string, kind: token.token_name, description: token.description, triggered_at: token.triggered_at }
token_name = token.token_name.gsub('service','runservice') # To make token naming consistent: we create the token as runservice
p = { id: token.id, string: token.string, kind: token_name, description: token.description, triggered_at: token.triggered_at }
if token.package
p[:project] = token.package.project.name
p[:package] = token.package.name
Expand Down

0 comments on commit cd99f7d

Please sign in to comment.