Retrospring/app/helpers/feedback_helper.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
370 B
Ruby
Raw Normal View History

2022-01-21 23:16:55 -08:00
# frozen_string_literal: true
2022-01-21 22:39:33 -08:00
module FeedbackHelper
def canny_token
return if current_user.nil?
2022-01-21 23:16:55 -08:00
user_data = {
2022-01-21 22:39:33 -08:00
avatarURL: current_user.profile_picture.url(:large),
2022-01-21 23:16:55 -08:00
name: current_user.screen_name,
id: current_user.id,
email: current_user.email,
2022-01-21 22:39:33 -08:00
}
2022-01-21 23:16:55 -08:00
JWT.encode(user_data, APP_CONFIG.dig("canny", "sso"))
2022-01-21 22:39:33 -08:00
end
2022-01-21 23:16:55 -08:00
end