/*
 * Controller: successCtrl
 */

import path from 'path';
import notifier from 'node-notifier';
import { clipboard } from 'electron';

export default (app, window, access_token) => {
    return app.controller('successCtrl', ['$scope', function successCtrl($scope) {
        $scope.access_token = access_token;

        $scope.copy = () => {
            clipboard.writeText(access_token);

            notifier.notify({
                title: 'Success',
                message: 'Copied to clipboard.',
                icon: path.join(__dirname, '..', '..', 'assets', 'images', 'icon.png')
            });
        };
    }]);
};

@@ -32,71 +32,8 @@
 */%0A%0A
-import path from 'path';%0Aimport notifier from 'node-notifier';%0A
 impo
@@ -338,48 +338,24 @@
    n
+ew N
 otifi
-er.notify(%7B%0A                title: 
+cation(
 'Suc
@@ -360,16 +360,18 @@
 uccess',
+ %7B
 %0A       
@@ -383,15 +383,12 @@
     
-message
+body
 : 'C
@@ -411,96 +411,8 @@
 rd.'
-,%0A                icon: path.join(__dirname, '..', '..', 'assets', 'images', 'icon.png')
 %0A   

Fix notification on success