Built motion from commit f861bcb808219e66da88ba48b61bddb35224a65e. Version 3.0.0...
[motion-next.git] / server / api / attachment / index.js
1 'use strict';const a40_0x74d1=['update','put','download','isAuthenticated','diskStorage','287192WXTLcI','/:id/download','path','Router','436427ScekiT','get','format','originalname','files/attachments/','577256pzCNjk','file','join','1rZnWRF','util','616132snhQGz','now','79PgQBhb','single','2SQgbBT','434236LnfCDF','381151jhLsFt','root','delete','post','@components/auth/service','/:id','multer','1329wJrFQq','index','replace'];const a40_0x430c=function(_0x55e855,_0x2e86e0){_0x55e855=_0x55e855-0x1f2;let _0x74d141=a40_0x74d1[_0x55e855];return _0x74d141;};const a40_0x77cae9=a40_0x430c;(function(_0x346e0d,_0x5ecab0){const _0x139d32=a40_0x430c;while(!![]){try{const _0xba47a0=-parseInt(_0x139d32(0x213))+parseInt(_0x139d32(0x209))*parseInt(_0x139d32(0x211))+parseInt(_0x139d32(0x1f2))*parseInt(_0x139d32(0x1fd))+parseInt(_0x139d32(0x1f4))*-parseInt(_0x139d32(0x1f6))+parseInt(_0x139d32(0x1f5))+parseInt(_0x139d32(0x205))+parseInt(_0x139d32(0x20e));if(_0xba47a0===_0x5ecab0)break;else _0x346e0d['push'](_0x346e0d['shift']());}catch(_0x452b46){_0x346e0d['push'](_0x346e0d['shift']());}}}(a40_0x74d1,0x70b64));const multer=require(a40_0x77cae9(0x1fc)),util=require(a40_0x77cae9(0x212)),path=require(a40_0x77cae9(0x207)),express=require('express'),router=express[a40_0x77cae9(0x208)](),auth=require(a40_0x77cae9(0x1fa)),{getConfig}=require('@config/get-config'),config=getConfig(),controller=require('./attachment.controller');router[a40_0x77cae9(0x20a)]('/',auth[a40_0x77cae9(0x203)](),controller[a40_0x77cae9(0x1fe)]),router['get'](a40_0x77cae9(0x1fb),auth['isAuthenticated'](),controller['show']),router[a40_0x77cae9(0x20a)](a40_0x77cae9(0x206),auth[a40_0x77cae9(0x203)](),controller[a40_0x77cae9(0x202)]),router[a40_0x77cae9(0x1f9)]('/:id/clone',auth[a40_0x77cae9(0x203)](),controller['clone']);const upload=multer({'storage':multer[a40_0x77cae9(0x204)]({'destination':function(_0x1b17c4,_0x141d45,_0x4c0ecd){const _0x25fefe=a40_0x77cae9;_0x4c0ecd(null,path[_0x25fefe(0x210)](config[_0x25fefe(0x1f7)],_0x25fefe(0x20d)));},'filename':function(_0xd3d59,_0x1e40c5,_0x1b6a6b){const _0x528f94=a40_0x77cae9;_0x1b6a6b(null,util[_0x528f94(0x20b)]('%s-%s',Date[_0x528f94(0x214)](),_0x1e40c5[_0x528f94(0x20c)][_0x528f94(0x1ff)](/[+@&/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[a40_0x77cae9(0x1f9)]('/',upload[a40_0x77cae9(0x1f3)](a40_0x77cae9(0x20f)),controller['create']),router[a40_0x77cae9(0x201)](a40_0x77cae9(0x1fb),auth[a40_0x77cae9(0x203)](),controller[a40_0x77cae9(0x200)]),router[a40_0x77cae9(0x1f8)]('/:id',auth[a40_0x77cae9(0x203)](),controller['destroy']),module['exports']=router;